IDEMPIERE-5900 [AutoProcuce] - Execute only when it is not a return (#2080)
This commit is contained in:
parent
e99c5cc4ca
commit
286ec63012
|
@ -67,7 +67,11 @@ public class AutoProduceEventDelegate extends ModelEventDelegate<MInOut> {
|
|||
@BeforeComplete
|
||||
public void onBeforeComplete() {
|
||||
MInOut mInOut = getModel();
|
||||
if (mInOut.isSOTrx()) {
|
||||
|
||||
boolean isGenerateProduction = (!MInOut.MOVEMENTTYPE_CustomerReturns.equals(mInOut.getMovementType())
|
||||
&& !MInOut.MOVEMENTTYPE_VendorReturns.equals(mInOut.getMovementType()));
|
||||
|
||||
if (mInOut.isSOTrx() && isGenerateProduction) {
|
||||
String msg = processShipment(mInOut);
|
||||
if (msg != null)
|
||||
throw new RuntimeException (msg);
|
||||
|
|
Loading…
Reference in New Issue