IDEMPIERE-5981 Misleading error when completing an auto-produce shipment (#2177)
* IDEMPIERE-5981 Misleading error when completing an auto-produce shipment * - more robust fix
This commit is contained in:
parent
0ea6a0352b
commit
da16af2a46
|
@ -240,7 +240,14 @@ public class AutoProduceEventDelegate extends ModelEventDelegate<MInOut> {
|
|||
//complete the production
|
||||
ProcessInfo pi = MWorkflow.runDocumentActionWorkflow(production, "CO");
|
||||
if (pi.isError()) {
|
||||
return production.getProcessMsg();
|
||||
StringBuilder msgError = new StringBuilder();
|
||||
if (!Util.isEmpty(pi.getSummary()))
|
||||
msgError.append(pi.getSummary());
|
||||
if (!Util.isEmpty(production.getProcessMsg()))
|
||||
msgError.append(" - " ).append(production.getProcessMsg());
|
||||
if (msgError.length() == 0) // unlikely to arrive here, but we need to ensure that issues is raised
|
||||
msgError.append("Error completing auto-produce production");
|
||||
return msgError.toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue