Commit fc3ed291 authored by Fabien Morin's avatar Fabien Morin

* remove a property in M2 propertysheet because it was two times in the file

* change modifyOrganisationFromM2 script to correct a problem (thanks to mame for finding it)
* remove unused lines

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23011 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c61cf178
...@@ -759,11 +759,6 @@ class M2: ...@@ -759,11 +759,6 @@ class M2:
, 'type' : 'date' , 'type' : 'date'
, 'mode' : 'w' , 'mode' : 'w'
}, },
{ 'id' : 'second_registration_number'
, 'description': 'Numero'
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'second_signature' { 'id' : 'second_signature'
, 'description': 'Signature' , 'description': 'Signature'
, 'type' : 'string' , 'type' : 'string'
......
...@@ -121,9 +121,9 @@ def attachLocationYearInfo(last_id):\n ...@@ -121,9 +121,9 @@ def attachLocationYearInfo(last_id):\n
location_info = request_eform.getSite().split(\'/\')[0]\n location_info = request_eform.getSite().split(\'/\')[0]\n
if location_info == \'dakar\':\n if location_info == \'dakar\':\n
location_initials = \'DKR\'\n location_initials = \'DKR\'\n
elif location_info == \'Thies\':\n elif location_info == \'thies\':\n
location_initials = \'TH\'\n location_initials = \'TH\'\n
elif location_info == \'Saint-Louis\':\n elif location_info == \'saint-louis\':\n
location_initials = \'SL\'\n location_initials = \'SL\'\n
year = str(date.year())\n year = str(date.year())\n
if request_eform.getMoralPerson():\n if request_eform.getMoralPerson():\n
...@@ -137,7 +137,6 @@ def attachLocationYearInfo(last_id):\n ...@@ -137,7 +137,6 @@ def attachLocationYearInfo(last_id):\n
type_of_form = \'E\'\n type_of_form = \'E\'\n
else:\n else:\n
type_of_form = \'M\'\n type_of_form = \'M\'\n
attach_info = \'SN\' + location_initials + year + type_of_form\n
last_corporate_registration_code = str(str(last_id).split(\'-\').pop())\n last_corporate_registration_code = str(str(last_id).split(\'-\').pop())\n
new_corporate_registration_code = \'%05d\' % int(str(int(last_corporate_registration_code)+1))\n new_corporate_registration_code = \'%05d\' % int(str(int(last_corporate_registration_code)+1))\n
return (\'-\'.join([\'SN\', location_initials, year,\n return (\'-\'.join([\'SN\', location_initials, year,\n
......
...@@ -107,7 +107,6 @@ def attachLocationYearInfo(last_id):\n ...@@ -107,7 +107,6 @@ def attachLocationYearInfo(last_id):\n
location_initials = \'SL\'\n location_initials = \'SL\'\n
year = str(application_date.year())\n year = str(application_date.year())\n
type_of_form = \'M\'\n type_of_form = \'M\'\n
attach_info = \'SN\' + location_initials + year + type_of_form\n
last_corporate_registration_code = str(str(last_id).split(\'-\').pop())\n last_corporate_registration_code = str(str(last_id).split(\'-\').pop())\n
new_corporate_registration_code = \'%05d\' % int(str(int(last_corporate_registration_code)+1))\n new_corporate_registration_code = \'%05d\' % int(str(int(last_corporate_registration_code)+1))\n
return (\'-\'.join([\'SN\', location_initials, year,\n return (\'-\'.join([\'SN\', location_initials, year,\n
...@@ -117,7 +116,9 @@ def attachLocationYearInfo(last_id):\n ...@@ -117,7 +116,9 @@ def attachLocationYearInfo(last_id):\n
# using custom method attachLocationYearInfo\n # using custom method attachLocationYearInfo\n
# we use corporate_registry for corporations and\n # we use corporate_registry for corporations and\n
# merchant_registry for merchants.\n # merchant_registry for merchants.\n
new_registry_number = request_eform.portal_ids.generateNewId(method=attachLocationYearInfo)\n new_registry_number = request_eform.portal_ids.generateNewId(\\\n
id_group = \'sn-%s\' % request_eform.getGroup(),\n
method=attachLocationYearInfo)\n
\n \n
#variable used to store activity of the organisation,activities should be\n #variable used to store activity of the organisation,activities should be\n
#separated with commas, and no space between them\n #separated with commas, and no space between them\n
...@@ -137,8 +138,7 @@ for organisation in organisation_list:\n ...@@ -137,8 +138,7 @@ for organisation in organisation_list:\n
destination_form_uid = request_eform.getUid())]\n destination_form_uid = request_eform.getUid())]\n
for assignment in assignment_list:\n for assignment in assignment_list:\n
assignment.open()\n assignment.open()\n
assignment.edit(destination_value=organisation,\n assignment.edit(destination_value=organisation)\n
corporate_registration_code=new_registry_number)\n
\n \n
if request_eform.getMoralPersonCheck():\n if request_eform.getMoralPersonCheck():\n
if request_eform.getCharacteristicsCheck():\n if request_eform.getCharacteristicsCheck():\n
...@@ -188,6 +188,7 @@ if new_corporate_registration_code != None:\n ...@@ -188,6 +188,7 @@ if new_corporate_registration_code != None:\n
else:\n else:\n
second_organisation.getDefaultAddress().modify()\n second_organisation.getDefaultAddress().modify()\n
\n \n
\n
# Update the request_eform with the allocated number\n # Update the request_eform with the allocated number\n
request_eform.edit(registration_number = new_registry_number,\n request_eform.edit(registration_number = new_registry_number,\n
second_date = application_date,\n second_date = application_date,\n
......
908 910
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment