Author: deepak
Date: Sat May 16 12:42:06 2015
New Revision: 1679741

URL: http://svn.apache.org/r1679741
Log:
Manually merged trunk r#1679740
============================================================
Applied patch from jira issue OFBIZ-5916 : Cutting List Report from 
Manufacturing Shipment Plans throws error due to due to missing EntityCondition 
import.

Thanks Christian Carlow for reporting issue and providing the fix.

Modified:
    
ofbiz/branches/release14.12/applications/manufacturing/widget/manufacturing/CuttingListReport.groovy

Modified: 
ofbiz/branches/release14.12/applications/manufacturing/widget/manufacturing/CuttingListReport.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/manufacturing/widget/manufacturing/CuttingListReport.groovy?rev=1679741&r1=1679740&r2=1679741&view=diff
==============================================================================
--- 
ofbiz/branches/release14.12/applications/manufacturing/widget/manufacturing/CuttingListReport.groovy
 (original)
+++ 
ofbiz/branches/release14.12/applications/manufacturing/widget/manufacturing/CuttingListReport.groovy
 Sat May 16 12:42:06 2015
@@ -51,13 +51,13 @@ productIdToQuantity = [:]; // key=produc
 productIdToProduct = [:]; // key=productId, value=product
 dimensionToProducts = [:]; // key=Dimension, value=list of products
 dimensionToQuantity = [:]; // key=Dimension, value=tot qty (of products)
-
-shipmentPlans = delegator.findList("OrderShipment", 
EntityCondition.makeCondition([shipmentId : shipmentId]), null, null, null, 
false);
+    
+shipmentPlans = from("OrderShipment").where("shipmentId", 
shipmentId).queryList()
 
 if (shipmentPlans) {
     shipmentPlans.each { shipmentPlan ->
         // Select the production run, if available
-        weIds = delegator.findList("WorkOrderItemFulfillment", 
EntityCondition.makeCondition([orderId : shipmentPlan.orderId, orderItemSeqId : 
shipmentPlan.orderItemSeqId]), null, ['workEffortId'], null, false); // TODO: 
add shipmentId
+        weIds = from("WorkOrderItemFulfillment").where("orderId", 
shipmentPlan.orderId, "orderItemSeqId", 
shipmentPlan.orderItemSeqId).orderBy("workEffortId").queryList(); // TODO: add 
shipmentId
         weId = EntityUtil.getFirst(weIds);
         productionRunTree = [] as ArrayList;
         // TODO


Reply via email to