Author: ashish
Date: Sat Dec 20 12:25:10 2014
New Revision: 1646966

URL: http://svn.apache.org/r1646966
Log:
Applied patch from jira issue OFBIZ-5385 - Purchase order 
immutable/unchangeable errors when adding variant products.
Thanks Christian for reporting the issue. Thanks Arun for providing the patch. 


Modified:
    
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java

Modified: 
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1646966&r1=1646965&r2=1646966&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
 (original)
+++ 
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
 Sat Dec 20 12:25:10 2014
@@ -1117,14 +1117,14 @@ nextProd:
                 Debug.logInfo("set the productId to: " + 
product.getString("productId"), module);
 
                 // copy the supplier
-                List<GenericValue> supplierProducts = 
EntityQuery.use(delegator).from("SupplierProduct").where("productId", 
productId).cache(true).queryList();
+                List<GenericValue> supplierProducts = 
EntityQuery.use(delegator).from("SupplierProduct").where("productId", 
productId).queryList();
                 for (GenericValue supplierProduct: supplierProducts) {
                     supplierProduct.set("productId",  
product.getString("productId"));
                     supplierProduct.create();
                 }
 
                 // copy the content
-                List<GenericValue> productContents = 
EntityQuery.use(delegator).from("ProductContent").where("productId", 
productId).cache(true).queryList();
+                List<GenericValue> productContents = 
EntityQuery.use(delegator).from("ProductContent").where("productId", 
productId).queryList();
                 for (GenericValue productContent: productContents) {
                     productContent.set("productId",  
product.getString("productId"));
                     productContent.create();


Reply via email to