diff --git a/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/ERP5RegistryOhada_getRelatedOrganisationList.xml b/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/ERP5RegistryOhada_getRelatedOrganisationList.xml index 402794bbaefd3ac97d8c59d45a371f289d90b4a8..176bbd07c85f013149be4b6f50944f1fa3414f4c 100644 --- a/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/ERP5RegistryOhada_getRelatedOrganisationList.xml +++ b/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/ERP5RegistryOhada_getRelatedOrganisationList.xml @@ -67,9 +67,9 @@ <key> <string>_body</string> </key> <value> <string>portal = context.getPortalObject()\n current_object = context.getObject()\n -rccm = current_object.getCorporateRegistrationCode()\n +rccm = current_object.getSourceReference()\n org_list = []\n -org_result = portal.organisation_module.searchFolder(corporate_registration_code=rccm)\n +org_result = portal.organisation_module.searchFolder(source_reference=rccm)\n org_list = [org.getObject() for org in org_result if org.getObject() != context.getObject()]\n return org_list\n </string> </value> diff --git a/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/ERP5RegistryOhada_getRelatedPersonList.xml b/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/ERP5RegistryOhada_getRelatedPersonList.xml index 079a378e0c93adb95ad1a29bf23e3ce473cccc87..82b6d98fdf7d54168141cf46dd3e09e35b0e3ee2 100644 --- a/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/ERP5RegistryOhada_getRelatedPersonList.xml +++ b/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/ERP5RegistryOhada_getRelatedPersonList.xml @@ -67,11 +67,8 @@ <key> <string>_body</string> </key> <value> <string>portal = context.getPortalObject()\n current_object = context.getObject()\n -rccm = current_object.getCorporateRegistrationCode()\n -pers_list = []\n -pers_result = portal.person_module.searchFolder(corporate_registration_code=rccm)\n -pers_list = [pers.getObject() for pers in pers_result]\n -return org_list\n +person_list = [assignment.getParentValue() for assignment in current_object.getDestinationRelatedValueList()]\n +return pers_list\n </string> </value> </item> <item> @@ -119,14 +116,12 @@ return org_list\n <string>context</string> <string>portal</string> <string>current_object</string> - <string>rccm</string> - <string>pers_list</string> - <string>pers_result</string> <string>append</string> <string>$append0</string> <string>_getiter_</string> - <string>pers</string> - <string>org_list</string> + <string>assignment</string> + <string>person_list</string> + <string>pers_list</string> </tuple> </value> </item> diff --git a/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/Form_getDestinationFormRelatedValueList.xml b/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/Form_getDestinationFormRelatedValueList.xml index 1ea13dc7a8a7da40a41999cc52c89be273f90786..2d37be90be6bb53395e3bcca15eaaa008c7c174e 100644 --- a/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/Form_getDestinationFormRelatedValueList.xml +++ b/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/Form_getDestinationFormRelatedValueList.xml @@ -80,7 +80,7 @@ for assignment in assignment_list:\n raise ValidationFailed, \'There is no Person corresponding to the corporate registration code %s\' % rccm\n person = pers_result[0].getObject()\n legal_form = person.getSocialForm()\n - if assignment.getFunction()==\'corporation/shareholder\' :\n + if assignment.getFunction()==\'entreprise/associe\' :\n if legal_form == \'gie\':\n assignment.getFunctionValue().setTitle(\'Membre du GIE\')\n elif legal_form == \'sarl\':\n diff --git a/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/Person_getCompaniesExploited.xml b/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/Person_getCompaniesExploited.xml index d7b619612fe14d7e4cea71ff24fd4f5bbb90764a..3abdc31cf4a95b19ad04109b11c3504d447f60d3 100644 --- a/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/Person_getCompaniesExploited.xml +++ b/bt5/erp5_registry_ohada/SkinTemplateItem/portal_skins/erp5_registry_ohada/Person_getCompaniesExploited.xml @@ -66,10 +66,11 @@ <item> <key> <string>_body</string> </key> <value> <string>current_object = context.getObject()\n -assgt_list=current_object.contentValues(filter={\'portal_type\': \'Assignment\',\'function\':\'merchant\',})\n +assignment_list = [assignment for assignment in current_object.contentValues(portal_type = \'Assignment\') \\\n + if assignment.getFunction() == \'commerce/commercant\']\n exploited_org_list = []\n -for assgt in assgt_list:\n - exploited_org_list.append(assgt.getDestinationValue())\n +for assignment in assignment_list:\n + exploited_org_list.append(assignment.getDestinationValue())\n return exploited_org_list\n </string> </value> </item> @@ -117,10 +118,12 @@ return exploited_org_list\n <string>_getattr_</string> <string>context</string> <string>current_object</string> - <string>assgt_list</string> - <string>exploited_org_list</string> + <string>append</string> + <string>$append0</string> <string>_getiter_</string> - <string>assgt</string> + <string>assignment</string> + <string>assignment_list</string> + <string>exploited_org_list</string> </tuple> </value> </item> diff --git a/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/createOrganisationFromM0.xml b/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/createOrganisationFromM0.xml index bab2559b9caf5c834d89549523be71aee3c60334..ada456453de996bc5a0332ba386b96931128b83c 100644 --- a/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/createOrganisationFromM0.xml +++ b/bt5/erp5_registry_ohada/WorkflowTemplateItem/portal_workflow/ohada_form_validation_interaction_workflow/scripts/createOrganisationFromM0.xml @@ -94,7 +94,6 @@ organisation.edit(\n corporate_name=request_eform.getName(),\n acronym=request_eform.getInitials(),\n sign=request_eform.getSign(),\n - default_address_street_address=request_eform.getWorkAddress(),\n default_address_city=request_eform.getDefaultAddressCity(),\n social_form=\'%s\' % request_eform.getLegalForm().lower(),\n price_currency=\'currency_module/1\', # object 1 is the devise XOF\n @@ -171,25 +170,26 @@ for assignment in assignment_list:\n if request_eform.getMoralPerson():\n organisation.edit(role=\'entreprise/siege\',\n corporate_registration_code=new_registry_number,\n + source_reference=new_registry_number,\n + default_address_street_address=request_eform.getHeadOfficeAddress(),\n geographic_incorporate_code =\'-\'.join(str(new_registry_number).split(\'-\')[0:2]))\n request_eform.edit(corporate_registration_code = new_registry_number)\n elif request_eform.getBranch():\n - organisation_list = [organisation.getObject() for organisation in\\\n - organisation_module.searchFolder(corporate_registration_code=request_eform.getCorporateRegistrationCode())]\n - for org in organisation_list:\n - organisation.edit(succursale_value = organisation,\n - role=\'entreprise/succursale\')\n - request_eform.edit(succursale_value = organisation)\n + organisation.edit(role=\'entreprise/succursale\',\n + default_address_street_address=request_eform.getFirstCompanyAddress(),\n + corporate_registration_code = new_registry_number,\n + source_reference=request_eform.getCorporateRegistrationCode())\n elif request_eform.getSecondCompany():\n - organisation_list = [organisation.getObject() for organisation in \\\n - organisation_module.searchFolder(corporate_registration_code=request_eform.getCorporateRegistrationCode())]\n - for org in organisation_list:\n - organisation.edit(agence_value = organisation,\n - role = \'entreprise/agence\')\n - request_eform.edit(agence_value = organisation)\n + organisation.edit(role = \'entreprise/agence\',\n + default_address_street_address=request_eform.getWorkAddress(),\n + corporate_registration_code = new_registry_number,\n + source_reference=request_eform.getCorporateRegistrationCode(),\n + )\n else:\n organisation.edit(role = \'entreprise/siege\',\n corporate_registration_code = request_eform.getCorporateRegistrationCode(),\n + source_reference = request_eform.getCorporateRegistrationCode(),\n + default_address_street_address=request_eform.getWorkAddress(),\n description = "Harmonisation d\'une personne morale")\n \n #Activate Organisation and update security\n @@ -308,8 +308,6 @@ for M0_bis in M0_bis_list:\n <string>assignment</string> <string>assignment_list</string> <string>str</string> - <string>organisation_list</string> - <string>org</string> <string>history_list</string> <string>history</string> <string>M0_bis</string> diff --git a/bt5/erp5_registry_ohada/bt/revision b/bt5/erp5_registry_ohada/bt/revision index 3e90fddabaf3ace09fc53f55094d2b34274bb759..147d4e7f1d088e88efeca660788eabafe939da66 100644 --- a/bt5/erp5_registry_ohada/bt/revision +++ b/bt5/erp5_registry_ohada/bt/revision @@ -1 +1 @@ -833 \ No newline at end of file +845 \ No newline at end of file