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
No related merge requests found
......@@ -759,11 +759,6 @@ class M2:
, 'type' : 'date'
, 'mode' : 'w'
},
{ 'id' : 'second_registration_number'
, 'description': 'Numero'
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'second_signature'
, 'description': 'Signature'
, 'type' : 'string'
......
......@@ -121,9 +121,9 @@ def attachLocationYearInfo(last_id):\n
location_info = request_eform.getSite().split(\'/\')[0]\n
if location_info == \'dakar\':\n
location_initials = \'DKR\'\n
elif location_info == \'Thies\':\n
elif location_info == \'thies\':\n
location_initials = \'TH\'\n
elif location_info == \'Saint-Louis\':\n
elif location_info == \'saint-louis\':\n
location_initials = \'SL\'\n
year = str(date.year())\n
if request_eform.getMoralPerson():\n
......@@ -137,7 +137,6 @@ def attachLocationYearInfo(last_id):\n
type_of_form = \'E\'\n
else:\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
new_corporate_registration_code = \'%05d\' % int(str(int(last_corporate_registration_code)+1))\n
return (\'-\'.join([\'SN\', location_initials, year,\n
......
......@@ -107,7 +107,6 @@ def attachLocationYearInfo(last_id):\n
location_initials = \'SL\'\n
year = str(application_date.year())\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
new_corporate_registration_code = \'%05d\' % int(str(int(last_corporate_registration_code)+1))\n
return (\'-\'.join([\'SN\', location_initials, year,\n
......@@ -117,7 +116,9 @@ def attachLocationYearInfo(last_id):\n
# using custom method attachLocationYearInfo\n
# we use corporate_registry for corporations and\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
#variable used to store activity of the organisation,activities should be\n
#separated with commas, and no space between them\n
......@@ -137,8 +138,7 @@ for organisation in organisation_list:\n
destination_form_uid = request_eform.getUid())]\n
for assignment in assignment_list:\n
assignment.open()\n
assignment.edit(destination_value=organisation,\n
corporate_registration_code=new_registry_number)\n
assignment.edit(destination_value=organisation)\n
\n
if request_eform.getMoralPersonCheck():\n
if request_eform.getCharacteristicsCheck():\n
......@@ -188,6 +188,7 @@ if new_corporate_registration_code != None:\n
else:\n
second_organisation.getDefaultAddress().modify()\n
\n
\n
# Update the request_eform with the allocated number\n
request_eform.edit(registration_number = new_registry_number,\n
second_date = application_date,\n
......
908
\ No newline at end of file
910
\ 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