[Erp5-report] r23012 - in /erp5/trunk/bt5/erp5_registry_ohada: WorkflowTemplateItem/portal_...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Aug 18 11:00:29 CEST 2008


Author: thibaut
Date: Mon Aug 18 11:00:21 2008
New Revision: 23012

URL: http://svn.erp5.org?rev=23012&view=rev
Log:
thibaut
improve script modifyPhysicalPersonFromP2.
Now we can remove and add activities with the same form
Edit the corporate registration code according to the different cases

Modified:
    erp5/trunk/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/modifyPhysicalPersonFromP2.xml
    erp5/trunk/bt5/erp5_registry_ohada/bt/revision

Modified: erp5/trunk/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/modifyPhysicalPersonFromP2.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/modifyPhysicalPersonFromP2.xml?rev=23012&r1=23011&r2=23012&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/modifyPhysicalPersonFromP2.xml (original)
+++ erp5/trunk/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/modifyPhysicalPersonFromP2.xml Mon Aug 18 11:00:21 2008
@@ -152,6 +152,8 @@
   #address, or its corporate name or whether the P2 form is used to create another\n
   #company for the person\n
   if request_eform.getCompanyModifications():\n
+    corporate_registration_code = request_eform.getCompanyCorporateRegistrationCode()\n
+    request_eform.edit(corporate_registration_code=corporate_registration_code)\n
     organisation_list = [organisation.getObject() for organisation in \\\n
         organisation_module.searchFolder(corporate_registration_code=request_eform.getCorporateRegistrationCode())]\n
     for organisation in organisation_list:\n
@@ -168,7 +170,7 @@
             if removed_activities in activity_list:\n
               activity_list.remove(removed_activities)\n
               organisation.edit(activity_free_text = \',\'.join(activity_list))\n
-        elif request_eform.getCompanyModifiedAddedActivities() != None:\n
+        if request_eform.getCompanyModifiedAddedActivities() != None:\n
           activity_list.append(request_eform.getCompanyModifiedAddedActivities())\n
           organisation.edit(activity_free_text = \',\'.join(activity_list))\n
 \n
@@ -193,8 +195,10 @@
   #If the person has secondaries organisations,\n
   #modify the secondaries organisations for the person\n
   elif request_eform.getEstablishmentModification():\n
+    corporate_registration_code = request_eform.getEstablishmentRegistrationCode()\n
+    request_eform.edit(corporate_registration_code=corporate_registration_code)\n
     organisation_list = [organisation.getObject() for organisation in \\\n
-        organisation_module.searchFolder(corporate_registration_code=request_eform.getNewCorporateRegistrationCode())]\n
+        organisation_module.searchFolder(corporate_registration_code=request_eform.getCorporateRegistrationCode())]\n
     for organisation in organisation_list:\n
       if request_eform.getClosingCheck():\n
         organisation.getDefaultAddress().close()\n
@@ -294,6 +298,7 @@
                             <string>person_list</string>
                             <string>len</string>
                             <string>ValidationFailed</string>
+                            <string>corporate_registration_code</string>
                             <string>organisation</string>
                             <string>organisation_list</string>
                             <string>activity_free_text</string>

Modified: erp5/trunk/bt5/erp5_registry_ohada/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_registry_ohada/bt/revision?rev=23012&r1=23011&r2=23012&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_registry_ohada/bt/revision (original)
+++ erp5/trunk/bt5/erp5_registry_ohada/bt/revision Mon Aug 18 11:00:21 2008
@@ -1,1 +1,1 @@
-910
+911




More information about the Erp5-report mailing list