From cc06c00048e77ac321092f18c8adf478109e1e73 Mon Sep 17 00:00:00 2001 From: trifonnt Date: Tue, 16 Feb 2010 07:20:21 +0000 Subject: [PATCH] BF [2947768] - Changing AttributeSet does not reset AttributeSetInstance https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2947768&group_id=176962 Use deleteEx instead of delete(). Thank's to Teo's advice. --- base/src/org/compiere/model/MProduct.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/src/org/compiere/model/MProduct.java b/base/src/org/compiere/model/MProduct.java index 16a1b2311d..75ebd521c6 100644 --- a/base/src/org/compiere/model/MProduct.java +++ b/base/src/org/compiere/model/MProduct.java @@ -616,7 +616,9 @@ public class MProduct extends X_M_Product MAttributeSetInstance asi = new MAttributeSetInstance(getCtx(), getM_AttributeSetInstance_ID(), get_TrxName()); setM_AttributeSetInstance_ID(0); // Delete the old m_attributesetinstance - if (!asi.delete(true, get_TrxName())) + try { + asi.deleteEx(true, get_TrxName()); + } catch (AdempiereException ex) { log.saveError("Error", "Error deleting the AttributeSetInstance"); return false;