[ofbiz-plugins] branch trunk updated: Fixed: Convert DimensionServices.xml minilang to groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-plugins] branch trunk updated: Fixed: Convert DimensionServices.xml minilang to groovy

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new a8d3781  Fixed: Convert DimensionServices.xml minilang to groovy
a8d3781 is described below

commit a8d3781cc6ae56863ef98a5092fd8a5095773d98
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Sat Mar 21 19:36:24 2020 +0100

    Fixed: Convert DimensionServices.xml minilang to groovy
   
    (OFBIZ-10948)
   
    Now correctly creates the CurrencyDimension using currency.uomId
    No need for delegator.setNextSeqId(), looking at (now removed)
    DimensionServices.xml confused me.
   
    Thanks: Pierre Smits for report
---
 bi/groovyScripts/DimensionServices.groovy | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bi/groovyScripts/DimensionServices.groovy b/bi/groovyScripts/DimensionServices.groovy
index 6207446..3bfb300 100644
--- a/bi/groovyScripts/DimensionServices.groovy
+++ b/bi/groovyScripts/DimensionServices.groovy
@@ -87,8 +87,7 @@ def loadCurrencyDimension() {
                 currencyDim.store()
             }
         } else {
-            currencyDim = delegator.makeValue("CurrencyDimension")
-            delegator.setNextSeqId(currencyDim)
+            currencyDim = delegator.makeValue("CurrencyDimension",["dimensionId":currency.uomId])
             currencyDim.currencyId = currency.uomId
             currencyDim.description = currency.description
             currencyDim.create()