You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2013/03/04 20:57:51 UTC
svn commit: r1452473 - in /ofbiz/branches/release11.04: ./
applications/product/src/org/ofbiz/product/product/ProductWorker.java
Author: jleroux
Date: Mon Mar 4 19:57:50 2013
New Revision: 1452473
URL: http://svn.apache.org/r1452473
Log:
"Applied fix from trunk for revision: 1452382"
------------------------------------------------------------------------
r1452382 | jleroux | 2013-03-04 17:42:33 +0100 (lun., 04 mars 2013) | 3 lines
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/branches/release11.04/ (props changed)
ofbiz/branches/release11.04/applications/product/src/org/ofbiz/product/product/ProductWorker.java
Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1452382
Modified: ofbiz/branches/release11.04/applications/product/src/org/ofbiz/product/product/ProductWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1452473&r1=1452472&r2=1452473&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original)
+++ ofbiz/branches/release11.04/applications/product/src/org/ofbiz/product/product/ProductWorker.java Mon Mar 4 19:57:50 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);
}