Author: jacopoc
Date: Thu Dec 9 11:30:46 2010
New Revision: 1043899
URL: http://svn.apache.org/viewvc?rev=1043899&view=rev
Log:
Improved error handling for the production run declaration screen; this fixes a
bug where, if matarials were missing, the production run declaration screen was
hiding the error message and the header fields in the screen were emptied.
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=1043899&r1=1043898&r2=1043899&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
(original)
+++
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
Thu Dec 9 11:30:46 2010
@@ -1823,6 +1823,9 @@ public class ProductionRunServices {
serviceContext.put("componentsLocationMap",
componentsLocationMap);
serviceContext.put("userLogin", userLogin);
Map resultService =
dispatcher.runSync("updateProductionRunTask", serviceContext);
+ if (ServiceUtil.isError(resultService)) {
+ return
ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultService));
+ }
} catch (GenericServiceException e) {
Debug.logError(e, "Problem calling the
changeProductionRunTaskStatus service", module);
return
ServiceUtil.returnError(UtilProperties.getMessage(resource,
"ManufacturingProductionRunStatusNotChanged", locale));
@@ -2125,7 +2128,10 @@ public class ProductionRunServices {
}
serviceContext.put("userLogin", userLogin);
Map resultService =
dispatcher.runSync("issueProductionRunTaskComponent", serviceContext);
- }
+ if (ServiceUtil.isError(resultService)) {
+ return
ServiceUtil.returnError(ServiceUtil.getErrorMessage(resultService));
+ }
+ }
}
} catch (GenericEntityException gee) {
Modified:
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml?rev=1043899&r1=1043898&r2=1043899&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
(original)
+++
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
Thu Dec 9 11:30:46 2010
@@ -262,6 +262,9 @@ under the License.
<!-- Production Run Declaration -->
<form name="ShowProductionRun" type="single" target="productionRunProduce"
title="" default-map-name="productionRunData"
header-row-style="header-row" default-table-style="basic-table">
+ <actions>
+ <set field="useRequestParameters" value="false" type="Boolean"/>
+ </actions>
<field name="workEffortId"><hidden/></field>
<field name="productId" title="${uiLabelMap.ProductProductName}">
<display-entity entity-name="Product" description="${internalName}
[${productId}]"/>
Modified:
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml?rev=1043899&r1=1043898&r2=1043899&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
(original)
+++
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
Thu Dec 9 11:30:46 2010
@@ -163,7 +163,7 @@ under the License.
<script
location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy"/>
<script
location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/productionRunAllFixedAssets.groovy"/>
- <set field="productionRunId"
from-field="parameters.productionRunId"/>
+ <set field="productionRunId"
from-field="parameters.productionRunId"
default-value="${parameters.workEffortId}"/>
<entity-one entity-name="WorkEffort"
value-field="productionRun">
<field-map field-name="workEffortId"
from-field="productionRunId"/>
</entity-one>