From 0c53a1b330bfe9a3e5e8414eae0cbe828f0f6dfb Mon Sep 17 00:00:00 2001 From: dantam Date: Wed, 1 Jul 2015 14:19:57 -0500 Subject: [PATCH] IDEMPIERE-1339 Add transaction when checking Product UOM in MUOMConversion --- org.adempiere.base/src/org/compiere/model/MUOMConversion.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MUOMConversion.java b/org.adempiere.base/src/org/compiere/model/MUOMConversion.java index 7dfc99b2c4..7c202c5042 100644 --- a/org.adempiere.base/src/org/compiere/model/MUOMConversion.java +++ b/org.adempiere.base/src/org/compiere/model/MUOMConversion.java @@ -707,7 +707,8 @@ public class MUOMConversion extends X_C_UOM_Conversion if (getM_Product_ID() != 0 && (newRecord || is_ValueChanged("M_Product_ID"))) { - MProduct product = MProduct.get(getCtx(), getM_Product_ID()); + // Check of product must be in the same transaction as the conversion being saved + MProduct product = new MProduct(getCtx(), getM_Product_ID(), get_TrxName()); if (product.getC_UOM_ID() != getC_UOM_ID()) { MUOM uom = MUOM.get(getCtx(), product.getC_UOM_ID());