From c3031074da5b357a7d36b88f3c3113a500fe79ca Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 24 Feb 2014 10:29:02 -0500 Subject: [PATCH] IDEMPIERE-1767 1003774 Business Partners are not being allowed to be imported with BP Groups in a 2pack. --- .../src/org/compiere/model/MBPGroup.java | 16 ++++++++++++++++ .../src/org/compiere/model/MBPartner.java | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) 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