IDEMPIERE-1339 Add transaction when checking Product UOM in MUOMConversion

This commit is contained in:
dantam 2015-07-01 14:19:57 -05:00
parent 392c96708b
commit 0c53a1b330
1 changed files with 2 additions and 1 deletions

View File

@ -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());