ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hans...@apache.org
Subject svn commit: r1636495 - /ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml
Date Tue, 04 Nov 2014 02:45:29 GMT
Author: hansbak
Date: Tue Nov  4 02:45:29 2014
New Revision: 1636495

URL: http://svn.apache.org/r1636495
Log:
role not checked for existence: https://issues.apache.org/jira/browse/OFBIZ-5845

Modified:
    ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml

Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml?rev=1636495&r1=1636494&r2=1636495&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml
(original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/opportunity/OpportunityServices.xml
Tue Nov  4 02:45:29 2014
@@ -165,9 +165,15 @@ This file contains basic services for Sa
             </if-not-empty>
             <!-- Check party role for create Lead Role -->
             <if-not-empty field="parameters.leadPartyId">
-                <set field="roleMap.roleTypeId" value="LEAD"/>
-                <set field="roleMap.partyId" from-field="parameters.leadPartyId"/>
-                <call-service service-name="createPartyRole" in-map-name="roleMap"/>
+                <entity-one value-field="leadRole" entity-name="PartyRole">
+                    <field-map field-name="partyId" from-field="parameters.leadPartyId"/>
+                    <field-map field-name="roleTypeId" value="LEAD"/>
+                </entity-one>
+                <if-empty field="leadRole">
+                    <set field="roleMap.roleTypeId" value="LEAD"/>
+                    <set field="roleMap.partyId" from-field="parameters.leadPartyId"/>
+                    <call-service service-name="createPartyRole" in-map-name="roleMap"/>
+                </if-empty>
             </if-not-empty>
             <set field="salesOpportunityRole.roleTypeId" value="LEAD"/>
             <set field="salesOpportunityRole.salesOpportunityId" from-field="parameters.salesOpportunityId"/>



Mime
View raw message