IDEMPIERE-5571 Shipment created by Drop Ship Material Receipt is not processing workflows (#1667)
This commit is contained in:
parent
19459be87b
commit
7e0202eedb
|
@ -52,6 +52,7 @@ import org.compiere.util.Trx;
|
||||||
import org.compiere.util.TrxEventListener;
|
import org.compiere.util.TrxEventListener;
|
||||||
import org.compiere.util.Util;
|
import org.compiere.util.Util;
|
||||||
import org.compiere.wf.MWFActivity;
|
import org.compiere.wf.MWFActivity;
|
||||||
|
import org.compiere.wf.MWorkflow;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shipment Model
|
* Shipment Model
|
||||||
|
@ -2001,13 +2002,11 @@ public class MInOut extends X_M_InOut implements DocAction, IDocsPostProcess
|
||||||
|
|
||||||
if (log.isLoggable(Level.FINE)) log.fine(dropShipment.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(dropShipment.toString());
|
||||||
|
|
||||||
dropShipment.setDocAction(DocAction.ACTION_Complete);
|
|
||||||
// do not post immediate dropshipment, should post after source shipment
|
// do not post immediate dropshipment, should post after source shipment
|
||||||
dropShipment.set_Attribute(DocumentEngine.DOCUMENT_POST_IMMEDIATE_AFTER_COMPLETE, Boolean.FALSE);
|
dropShipment.set_Attribute(DocumentEngine.DOCUMENT_POST_IMMEDIATE_AFTER_COMPLETE, Boolean.FALSE);
|
||||||
// added AdempiereException by Zuhri
|
ProcessInfo processInfo = MWorkflow.runDocumentActionWorkflow(dropShipment, DocAction.ACTION_Complete);
|
||||||
if (!dropShipment.processIt(DocAction.ACTION_Complete))
|
if (processInfo.isError())
|
||||||
throw new AdempiereException(Msg.getMsg(getCtx(), "FailedProcessingDocument") + " - " + dropShipment.getProcessMsg());
|
throw new RuntimeException(Msg.getMsg(getCtx(), "FailedProcessingDocument") + ": " + dropShipment.toString() + " - " + dropShipment.getProcessMsg());
|
||||||
// end added
|
|
||||||
dropShipment.saveEx();
|
dropShipment.saveEx();
|
||||||
|
|
||||||
return dropShipment;
|
return dropShipment;
|
||||||
|
|
Loading…
Reference in New Issue