diff --git a/org.adempiere.base/src/org/adempiere/base/event/delegate/AutoProduceEventDelegate.java b/org.adempiere.base/src/org/adempiere/base/event/delegate/AutoProduceEventDelegate.java index 1307db053c..e6b454b5ff 100644 --- a/org.adempiere.base/src/org/adempiere/base/event/delegate/AutoProduceEventDelegate.java +++ b/org.adempiere.base/src/org/adempiere/base/event/delegate/AutoProduceEventDelegate.java @@ -240,7 +240,14 @@ public class AutoProduceEventDelegate extends ModelEventDelegate { //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; }