Author: jleroux
Date: Mon Jan 12 17:19:21 2015
New Revision: 1651145
URL: http://svn.apache.org/r1651145
Log:
A patch from Christian Carlow for "Error when viewing Shipment Plan from
Manufacturing" https://issues.apache.org/jira/browse/OFBIZ-5915
This error appears when clicking on a shipment plan from the Manufacturing
Shipment Plans: Error running script at location
[component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy]:
java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to
java.lang.String
The error is caused by an invalid call to delegator.findByAnd at line of 150 of
WorkWithShipmentPlans.groovy.
To reproduce:
1. Create an order for an item associated with a ship group
2. After order creation click "New Shipment" for the ship group
3. Change the shipment status to "Scheduled'
4. Add a Shipment Plan
5. Navigate to Manufacturing -> Shipment Plans
6. Click "View" for the shipment plan
jleroux: Only R13.07 branch was concerned. The bug was introduced by r1338408
after the R12.04 release. The trunk and R14.12 branch uses correctly the
EntityQuery mechanism
Modified:
ofbiz/branches/release13.07/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy
Modified:
ofbiz/branches/release13.07/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy?rev=1651145&r1=1651144&r2=1651145&view=diff
==============================================================================
---
ofbiz/branches/release13.07/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy
(original)
+++
ofbiz/branches/release13.07/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy
Mon Jan 12 17:19:21 2015
@@ -147,7 +147,7 @@ if (shipmentPlans) {
}
rows.add(oneRow);
// Select the production runs, if available
- productionRuns = delegator.findByAnd("WorkOrderItemFulfillment",
[orderId : shipmentPlan.orderId, orderItemSeqId : shipmentPlan.orderItemSeqId,
shipGroupSeqId : shipmentPlan.shipGroupSeqId],["workEffortId"], null, false);
// TODO: add shipmentId
+ productionRuns = delegator.findByAnd("WorkOrderItemFulfillment",
[orderId : shipmentPlan.orderId, orderItemSeqId : shipmentPlan.orderItemSeqId,
shipGroupSeqId : shipmentPlan.shipGroupSeqId],["workEffortId"], false); //
TODO: add shipmentId
if (productionRuns) {
workInProgress = "true";
productionRunsId = "";