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
|
@BeforeComplete
|
||||||
public void onBeforeComplete() {
|
public void onBeforeComplete() {
|
||||||
MInOut mInOut = getModel();
|
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);
|
String msg = processShipment(mInOut);
|
||||||
if (msg != null)
|
if (msg != null)
|
||||||
throw new RuntimeException (msg);
|
throw new RuntimeException (msg);
|
||||||
|
|
Loading…
Reference in New Issue