Commit 85f28dcf authored by Fabien Morin's avatar Fabien Morin

2008-11-17 mohamadou

* update workflow script for new form.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24605 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 24f31fc0
......@@ -60,7 +60,7 @@ organisation_module = portal.getDefaultModule(portal_type=\'Organisation\')\n
\n
\n
result = changed_object.portal_catalog(portal_type=\'Organisation\',\n
vat_code=changed_object.getNineaNumber())\n
vat_code=changed_object.getCompanyNineaNumber())\n
\n
# if the organisation don\'t exists, create it\n
if not len(result):\n
......@@ -70,10 +70,13 @@ if not len(result):\n
corporate_name=changed_object.getCompanyName(),\n
address_street_address=changed_object.getCompanyAddress(),\n
address_city=changed_object.getCityName(),\n
address_region=changed_object.getCountryName(),\n
corporate_registration_code=changed_object.getRccmNumber(),\n
vat_code=changed_object.getNineaNumber(),\n
corporate_registration_code=changed_object.getCompanyRccmNumber(),\n
vat_code=changed_object.getCompanyNineaNumber(),\n
activity_code=changed_object.getCompanyCofiNumber(),\n
default_email_text=changed_object.getCompanyEmail(),\n
acronym=changed_object.getCompanySigle(),\n
default_telephone_text=changed_object.getCompanyPhoneNumber(),\n
default_fax_text=changed_object.getCompanyFaxNumber(),\n
)\n
else:\n
organisation = result[0].getObject()\n
......@@ -87,20 +90,15 @@ accountant = person_module.newContent(portal_type=\'Person\',\n
default_email_text=changed_object.getAccountantEmail(),\n
address_street_address=changed_object.getAccountantAddress(),\n
address_city=changed_object.getAccountantCity(),\n
default_address_region=changed_object.getAccountantCountry(),\n
career_subordination_value=organisation)\n
if changed_object.getOptionAdministrator():\n
accountant.setFunction(\'entreprise/directeur/pdg/administrateur\')\n
elif changed_object.getOptionManager():\n
accountant.setFunction(\'entreprise/directeur/pdg/gerant\')\n
elif changed_object.getOptionDirector():\n
accountant.setFunction(\'entreprise/directeur/pdg/pdg\')\n
\n
\n
# create an assignment to be able to login :\n
from DateTime import DateTime\n
assignment = accountant.newContent(portal_type=\'Assignment\')\n
assignment.setStartDate(DateTime())\n
assignment.setStopDate(DateTime()+365)\n
assignment.setCareerFunction(changed_object.getAccountantFunction())\n
assignment.open()\n
\n
# set the login and password required a manager role, so a script with a \n
......
......@@ -59,7 +59,7 @@ changed_object = state_change[\'object\']\n
translateString = changed_object.Base_translateString\n
login = changed_object.getCompanyName().lower()\n
portal_catalog = changed_object.portal_catalog\n
ninea = changed_object.getNineaNumber()\n
ninea = changed_object.getCompanyNineaNumber()\n
\n
# check that no existing organisation have the same NINEA number or login\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
......
2008-11-17 mohamadou
* update workflow script for new form.
2008-11-11 fabien
* modify some scripts to be able to make a subscription using the new safi form
* add assignment on person created
* typo
2008-11-03 fabien
......
448
\ No newline at end of file
449
\ 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