diff --git a/org.adempiere.base/src/org/compiere/model/MBPGroup.java b/org.adempiere.base/src/org/compiere/model/MBPGroup.java index ee6f9f8e24..9462399d8e 100644 --- a/org.adempiere.base/src/org/compiere/model/MBPGroup.java +++ b/org.adempiere.base/src/org/compiere/model/MBPGroup.java @@ -26,6 +26,7 @@ import org.compiere.util.CCache; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; +import org.compiere.util.Util; /** * Business Partner Group Model @@ -58,6 +59,21 @@ public class MBPGroup extends X_C_BP_Group return retValue; } // get + /** + * + * @param ctx + * @param C_BP_Group_ID + * @param trxName + * @return MBPGroup + */ + public static MBPGroup get (Properties ctx, int C_BP_Group_ID, String trxName) + { + if (Util.isEmpty(trxName, true)) + return get(ctx, C_BP_Group_ID); + else + return new MBPGroup (ctx, C_BP_Group_ID, trxName); + } + /** * Get Default MBPGroup * @param ctx context diff --git a/org.adempiere.base/src/org/compiere/model/MBPartner.java b/org.adempiere.base/src/org/compiere/model/MBPartner.java index 9c96bb9fda..622868f57f 100644 --- a/org.adempiere.base/src/org/compiere/model/MBPartner.java +++ b/org.adempiere.base/src/org/compiere/model/MBPartner.java @@ -822,7 +822,7 @@ public class MBPartner extends X_C_BPartner if (getC_BP_Group_ID() == 0) m_group = MBPGroup.getDefault(getCtx()); else - m_group = MBPGroup.get(getCtx(), getC_BP_Group_ID()); + m_group = MBPGroup.get(getCtx(), getC_BP_Group_ID(), get_TrxName()); } return m_group; } // getBPGroup