You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ml...@apache.org on 2024/09/06 14:12:51 UTC

(ofbiz-framework) branch trunk updated: Fixed: Convert RequirementServices.xml mini lang to groovy (OFBIZ-12745)

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 4ef71d9d86 Fixed: Convert RequirementServices.xml mini lang to groovy (OFBIZ-12745)
4ef71d9d86 is described below

commit 4ef71d9d863772b81e9864a6a93fa05a30f82e7b
Author: MLeila <ml...@apache.org>
AuthorDate: Fri Sep 6 16:06:55 2024 +0200

    Fixed: Convert RequirementServices.xml mini lang to groovy (OFBIZ-12745)
---
 .../apache/ofbiz/order/requirement/RequirementServicesScript.groovy    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/applications/order/src/main/groovy/org/apache/ofbiz/order/requirement/RequirementServicesScript.groovy b/applications/order/src/main/groovy/org/apache/ofbiz/order/requirement/RequirementServicesScript.groovy
index 8ee43ac33b..1bc6954797 100644
--- a/applications/order/src/main/groovy/org/apache/ofbiz/order/requirement/RequirementServicesScript.groovy
+++ b/applications/order/src/main/groovy/org/apache/ofbiz/order/requirement/RequirementServicesScript.groovy
@@ -61,10 +61,11 @@ Map autoAssignRequirementToSupplier() {
             }
             GenericValue supplierProduct = supplierProductsQuery.queryFirst()
             if (supplierProduct?.partyId) {
-                delegator.createOrStore('RequirementRole', [requirementId: requirement.requirementId,
+                GenericValue requirementRole = delegator.makeValue('RequirementRole', [requirementId: requirement.requirementId,
                                                             partyId: supplierProduct.partyId,
                                                             roleTypeId: 'SUPPLIER',
                                                             fromDate: UtilDateTime.nowTimestamp()])
+                delegator.createOrStore(requirementRole)
             }
         }
         return success()