This is an automated email from the ASF dual-hosted git repository.
pawan pushed a commit to branch trunk
in repository
https://gitbox.apache.org/repos/asf/ofbiz-plugins.gitThe following commit(s) were added to refs/heads/trunk by this push:
new 38112fb Fixed: prepareProductDimensionData does not load correct fields in ProductDimension (OFBIZ-11465)
38112fb is described below
commit 38112fb34691c8efb2d70d2661dac296ecb8b654
Author: Pawan Verma <
[hidden email]>
AuthorDate: Sat Mar 21 17:23:05 2020 +0530
Fixed: prepareProductDimensionData does not load correct fields in ProductDimension
(OFBIZ-11465)
Thanks: Pierre Smits for your contribution.
---
bi/groovyScripts/DimensionServices.groovy | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bi/groovyScripts/DimensionServices.groovy b/bi/groovyScripts/DimensionServices.groovy
index 2a1dd01..6207446 100644
--- a/bi/groovyScripts/DimensionServices.groovy
+++ b/bi/groovyScripts/DimensionServices.groovy
@@ -102,8 +102,9 @@ def prepareProductDimensionData() {
return error(UtilProperties.getMessage('ProductUiLabels', 'ProductProductNotFoundWithProduct', locale))
}
productDimension = delegator.makeValue("ProductDimension")
- productDimension.setNonPKFields(parameters)
- GenericValue productType = select("description").from("Product").where("productId", parameters.productId).queryOne()
+ productDimension.setNonPKFields(product)
+ GenericValue productType = select("description").from("ProductType")
+ .where("productTypeId", product.productTypeId).cache().queryOne()
productDimension.productType = productType.description
Map result = success()
result.productDimension = productDimension