BF [2947768] - Changing AttributeSet does not reset AttributeSetInstance
https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2947768&group_id=176962 Tested with Postgres DB.
This commit is contained in:
parent
0288e96f00
commit
ae98fa29f1
|
@ -610,6 +610,19 @@ public class MProduct extends X_M_Product
|
||||||
if (m_precision != null && is_ValueChanged("C_UOM_ID"))
|
if (m_precision != null && is_ValueChanged("C_UOM_ID"))
|
||||||
m_precision = null;
|
m_precision = null;
|
||||||
|
|
||||||
|
// AttributeSetInstance reset
|
||||||
|
if (is_ValueChanged(COLUMNNAME_M_AttributeSet_ID))
|
||||||
|
{
|
||||||
|
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()))
|
||||||
|
{
|
||||||
|
log.saveError("Error", "Error deleting the AttributeSetInstance");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} // beforeSave
|
} // beforeSave
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue