Author: jleroux
Date: Sat Jul 7 07:15:12 2018
New Revision: 1835295
URL:
http://svn.apache.org/viewvc?rev=1835295&view=revLog:
Improved: Convert CategoryServices.xml mini lang to groovy
(OFBIZ-10031)
Fixes an issue with previous patch.
The problem was, that the value newEntity was made with the parameters map,
which resulted in a value, which didn't had the sequenced id, that I tried to
fix.
But after removing the map, everything works just fine
Thanks: Dennis Balkir
Modified:
ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/product/category/CategoryServices.groovy
Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/product/category/CategoryServices.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/product/category/CategoryServices.groovy?rev=1835295&r1=1835294&r2=1835295&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/product/category/CategoryServices.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/product/category/CategoryServices.groovy Sat Jul 7 07:15:12 2018
@@ -643,12 +643,12 @@ def deleteProductCategoryAttribute() {
* create a ProductCategoryLink
*/
def createProductCategoryLink() {
- GenericValue newEntity = makeValue("ProductCategoryLink", parameters)
+ GenericValue newEntity = makeValue("ProductCategoryLink")
newEntity.productCategoryId = parameters.productCategoryId
// don't set the fromDate yet; let's get the seq ID first
if(!parameters.linkSeqId) {
- newEntity.linkSeqId = delegator.getNextSeqId("newEntity")
+ delegator.setNextSubSeqId(newEntity, "linkSeqId", 5, 1)
}
// now set the rest of the PK fields (should just be fromDate now; unless linkSeqId is not empty)