Dear Adempiere developers,
while using Adempiere I'm always facing this problem: I have a lot of Material Receipt (MInOut) that goes to DocStatus=DOCACTION_Invalidate (e.g. due the fact that a product has mandatory attribute set instance but this has not been entered yet)
When it goes to this DocState I cannot erase MInOutLine anymore, see MInOutLine.beforeDelete().
Unfortunately sometimes it happens that the "best" thing to do to make MInOut to return to a valid state and allow me to complete it, is to delete some MInOutLine (e.g. the above line without ASI)
I have an old version of Adempiere (3.2.0, merged with some more recent changed for bug fixed) but the same is in the current trunk.
I make the following patch to allow MInOutLine deletion even if DocState is Invalidate
diff --git a/base/src/org/compiere/model/MInOutLine.java b/base/src/org/compiere/model/MInOutLine.java
index ccb2a06..cf5b16c 100644
@@ -607,7 +607,8 @@ public class MInOutLine extends X_M_InOutLine
protected boolean beforeDelete ()
- if (getParent().getDocStatus().equals(MInOut.DOCSTATUS_Drafted))
+ if (getParent().getDocStatus().equals(MInOut.DOCSTATUS_Drafted)
+ || getParent().getDocStatus().equals(MInOut.DOCACTION_Invalidate))
log.saveError("Error", Msg.getMsg(getCtx(), "CannotDelete"));
Do you think this can lead to some problems or is safe?
In standard Compiere we delete if drafted or in progress.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.