Author: jleroux
Date: Mon Mar 4 16:42:33 2013
New Revision: 1452382
URL: http://svn.apache.org/r1452382
Log:
A patch from Shi Jinghai "Apply desiredUomId in ProductWorker.getProductWeight"
https://issues.apache.org/jira/browse/OFBIZ-5147
In getProductWeight method of
applications/product/src/org/ofbiz/product/product/ProductWorker.java, the
desiredUomId is not applied when calling convertUom service. I replaced "WT_lb"
with desiredUomId.
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=1452382&r1=1452381&r2=1452382&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
Mon Mar 4 16:42:33 2013
@@ -819,7 +819,7 @@ public class ProductWorker {
if (desiredUomId != null && product.get("weightUomId") != null &&
!desiredUomId.equals(product.get("weightUomId"))) {
Map<String, Object> result = FastMap.newInstance();
try {
- result = dispatcher.runSync("convertUom",
UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", "WT_lb",
"originalValue", weight));
+ result = dispatcher.runSync("convertUom",
UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", desiredUomId,
"originalValue", weight));
} catch (GenericServiceException e) {
Debug.logError(e, module);
}