Maybe the best option is to revert the commit, discuss and improve the patch (in Jira) and then possibly recommit it.

Cheers,

Jacopo

On Sep 14, 2008, at 10:24 PM, Jacques Le Roux wrote:

Jacopo,

Yes you are right I should have used ProductStoreRole to retrieve the SALES_REP of the store. I will do if we do not reject all the patch as David seems to be inclined...

Thanks

Jacques

From: "Jacopo Cappellato" <[EMAIL PROTECTED]>
Jacques,

I am a bit confused.... why should the "admin" user be hardcoded into a service?

Jacopo

On Sep 14, 2008, at 9:20 PM, [EMAIL PROTECTED] wrote:

Author: jleroux
Date: Sun Sep 14 12:20:12 2008
New Revision: 695268

URL: http://svn.apache.org/viewvc?rev=695268&view=rev
Log:
A modified patch from Patrick Antivackis "Create a party relationship between a new customer and the product store in the eCommerce application" (https://issues.apache.org/jira/browse/OFBIZ-1955 ) - OFBIZ-1955 I modified since we need a party to relate not a store, hence admin as SALES_REP

Modified:
ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/ customer/CustomerEvents.xml

Modified: ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ ecommerce/customer/CustomerEvents.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=695268&r1=695267&r2=695268&view=diff
= = = = = = = = = = ==================================================================== --- ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/ customer/CustomerEvents.xml (original) +++ ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/ customer/CustomerEvents.xml Sun Sep 14 12:20:12 2008
@@ -307,6 +307,13 @@
       <create-value value-name="partyDataSource"/>
<call-service service-name="createPartyRole" in-map- name="partyRoleContext" include-user-login="true"/>

+ <!-- Create party relationship between the new customer and the product store sales representative -->
+        <set field="partyRelationshipCtx.partyIdTo" value="admin"/>
+ <set field="partyRelationshipCtx.roleTypeIdTo" value="SALES_REP"/> + <set field="partyRelationshipCtx.roleTypeIdFrom" value="CUSTOMER"/> + <set field="partyRelationshipCtx.partyRelationshipTypeId" value="CUSTOMER_REL"/> + <call-service service-name="createPartyRelationship" in- map- name="partyRelationshipCtx"/>
+
       <!-- shipping address -->
<if-compare field="parameters.USE_ADDRESS" operator="equals" value="false">
           <!-- address not used, do nothing -->
@@ -1368,4 +1375,4 @@
           <store-value value-name="loggedInUser"/>
       </if-compare>
   </simple-method>
-</simple-methods>
\ No newline at end of file
+</simple-methods>





Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to