Commit 6b4a88e4 authored by Thibaut Deheunynck's avatar Thibaut Deheunynck

thibaut

Modify Form M2_viewAssignmentFastInputDialog.
Change script M0_getFastInputDialogAssignmentList. ( typo issues ).
Modify scripts which retreive and update the assignment list when you modify person and this function on a M2 Form.
And finaly change script modifyOrganisationFromM2 in order to put assignment in the good state (ie: open ) and the good destination value

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22939 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 45182763
......@@ -156,7 +156,7 @@ if len(m0_bis_result):\n
last_name=associateLastName(),\n
start_date=associateBirthday(),\n
default_birthplace_address_city=associateBirthPlace(),\n
description=associateAnotherInfo,)\n
description=associateAnotherInfo(),)\n
\n
\n
\n
......@@ -194,7 +194,7 @@ if len(m0_bis_result):\n
last_name=administratorLastName(),\n
start_date=administratorBirthday(),\n
default_birthplace_address_city=administratorBirthPlace(),\n
description=administratorAnotherInfo,)\n
description=administratorAnotherInfo(),)\n
\n
\n
#Create Auditors\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
This script creates a list Person objects based\n
on the M2 form information. It updates the list of persons\n
based on fast input entries.\n
"""\n
from string import zfill\n
global result_list\n
global uid\n
uid = 0\n
result_list = []\n
request = context.REQUEST\n
listbox = getattr(request, \'listbox\', None) # Retrieve the fast input data if any\n
\n
\n
def addPerson(first_name=None, last_name=None,\n
start_date=None, default_birthplace_address_city=None,\n
description=None, function=None, old_function=None,\n
new=None, going=None, maintained=None, modified=None, **kw):\n
"""\n
This creates a single temporary person with all appropriate parameters\n
"""\n
global result_list\n
global uid\n
if not (first_name or last_name):\n
return\n
uid_string = \'new_%s\' % zfill(uid, 3)\n
if listbox is not None:\n
# Use input parameters instead of default\n
# if available in listbox\n
line = listbox[zfill(uid, 3)]\n
if line.has_key(\'last_name\') and line.has_key(\'first_name\') :\n
first_name = line[\'first_name\']\n
last_name = line[\'last_name\']\n
status = None\n
if new:\n
status = \'_new_action\'\n
elif going:\n
status = \'_go_action\'\n
elif maintained:\n
status = \'_action_maintain\'\n
elif modified:\n
status = \'_action_modify\'\n
person = context.getPortalObject().person_module.newContent(\n
portal_type=\'Person\',\n
uid=uid_string,\n
first_name=first_name,\n
last_name=last_name,\n
start_date=start_date,\n
default_birthplace_address_city=default_birthplace_address_city,\n
function=function,\n
old_function=old_function,\n
description=description,\n
status=status,\n
temp_object=1,\n
is_indexable=0,\n
)\n
result_list.append(person)\n
uid += 1\n
\n
\n
\n
#Create Shareholders\n
addPerson(first_name=context.getFirstAssociateFirstname(),\n
last_name=context.getFirstAssociateLastname(),\n
start_date=context.getFirstAssociateBirthday(),\n
default_birthplace_address_city=context.getFirstAssociateBirthplace(),\n
function=context.getFirstAssociateNewQuality(),\n
old_function=context.getFirstAssociateOldQuality(),\n
new=context.getFirstAssociateNewCheck(),\n
going=context.getFirstAssociateGoingCheck(),\n
maintained=context.getFirstAssociateMaintainedCheck(),\n
modified=context.getFirstAssociateModifiedCheck(),)\n
\n
addPerson(first_name=context.getSecondAssociateFirstname(),\n
last_name=context.getSecondAssociateLastname(),\n
start_date=context.getSecondAssociateBirthday(),\n
default_birthplace_address_city=context.getSecondAssociateBirthplace(),\n
function=context.getSecondAssociateNewQuality(),\n
old_function=context.getSecondAssociateOldQuality(),\n
new=context.getSecondAssociateNewCheck(),\n
going=context.getSecondAssociateGoingCheck(),\n
maintained=context.getSecondAssociateMaintainedCheck(),\n
modified=context.getSecondAssociateModifiedCheck(),)\n
\n
# only if there is M2 bis form :\n
m2_bis_result = context.contentValues(portal_type=\'M2 Bis\')\n
number_list = (\'Third\', \'Fourth\', \'Fifth\', \'Sixth\', \'Seventh\',\n
\'Eighth\', \'Ninth\')\n
\n
if len(m2_bis_result):\n
for m2 in m2_bis_result:\n
for number in number_list:\n
associateFirstName = getattr(m2, \'get%sAssociateFirstname\' % number, None)\n
associateLastName = getattr(m2, \'get%sAssociateLastname\' % number, None)\n
associateBirthday = getattr(m2, \'get%sAssociateBirthday\' % number, None)\n
associateBirthPlace = getattr(m2, \'get%sAssociateBirthplace\' % number, None)\n
associateAnotherInfo = getattr(m2, \'get%sAssociateAnotherInfo\' % number, None)\n
addPerson(first_name=associateFirstName(),\n
last_name=associateLastName(),\n
start_date=associateBirthday(),\n
default_birthplace_address_city=associateBirthPlace(),\n
function=\'entreprise/associe\',\n
old_function=None,\n
description=associateAnotherInfo(),)\n
\n
\n
#Create Managers\n
addPerson(first_name=context.getFirstAdministratorFirstname(),\n
last_name=context.getFirstAdministratorLastname(),\n
start_date=context.getFirstAdministratorBirthday(),\n
default_birthplace_address_city=context.getFirstAdministratorBirthplace(),\n
function=context.getFirstAdministratorNewQuality(),\n
old_function=context.getFirstAdministratorOldQuality(),\n
new=context.getFirstAdministratorNewCheck(),\n
going=context.getFirstAdministratorGoingCheck(),\n
maintained=context.getFirstAdministratorMaintainedCheck(),\n
modified=context.getFirstAdministratorModifiedCheck(),)\n
\n
addPerson(first_name=context.getSecondAdministratorFirstname(),\n
last_name=context.getSecondAdministratorLastname(),\n
start_date=context.getSecondAdministratorBirthday(),\n
default_birthplace_address_city=context.getSecondAdministratorBirthplace(),\n
function=context.getSecondAdministratorNewQuality(),\n
old_function=context.getSecondAdministratorOldQuality(),\n
new=context.getSecondAdministratorNewCheck(),\n
going=context.getSecondAdministratorGoingCheck(),\n
maintained=context.getSecondAdministratorMaintainedCheck(),\n
modified=context.getSecondAdministratorModifiedCheck(),)\n
\n
# only if there is M2 bis form :\n
number_list = (\'Third\', \'Fourth\', \'Fifth\', \'Sixth\', \'Seventh\',\n
\'Eighth\', \'Ninth\', \'Tenth\')\n
\n
if len(m2_bis_result):\n
for m2 in m2_bis_result:\n
for number in number_list:\n
administratorFirstName = getattr(m2, \'get%sAdministratorFirstname\' % number, None)\n
administratorLastName = getattr(m2, \'get%sAdministratorLastname\' % number, None)\n
administratorBirthday = getattr(m2, \'get%sAdministratorBirthday\' % number, None)\n
administratorBirthPlace = getattr(m2, \'get%sAdministratorBirthplace\' % number, None)\n
administratorAnotherInfo = getattr(m2, \'get%sAdministratorAnotherInfo\' % number, None)\n
\n
addPerson(first_name=administratorFirstName(),\n
last_name=administratorLastName(),\n
start_date=administratorBirthday(),\n
default_birthplace_address_city=administratorBirthPlace(),\n
function=\'entreprise/directeur/administrateur\',\n
old_function=None,\n
description=administratorAnotherInfo(),)\n
\n
number_list = (\'First\', \'Second\', \'Third\', \'Fourth\', \'Fifth\', \'Sixth\', \'Seventh\')\n
\n
if len(m2_bis_result):\n
for m2 in m2_bis_result:\n
for number in number_list:\n
auditorFirstName = getattr(m2, \'get%sAuditorFirstname\' % number, None)\n
auditorLastName = getattr(m2, \'get%sAuditorLastname\' % number, None)\n
auditorBirthday = getattr(m2, \'get%sAuditorBirthday\' % number, None)\n
auditorBirthPlace = getattr(m2, \'get%sAuditorBirthplace\' % number, None)\n
AuditorAnotherInfo = getattr(m2, \'get%sAuditorAnotherInfo\' % number, None)\n
\n
addPerson(first_name=auditorFirstName(),\n
last_name=auditorLastName(),\n
start_date=auditorBirthday(),\n
default_birthplace_address_city=auditorBirthPlace(),\n
function=\'comptabilite/commissaire\',\n
old_function=None,\n
description=auditorAnotherInfo(),)\n
\n
return result_list\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>lines_num=10, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>lines_num</string>
<string>kw</string>
<string>string</string>
<string>zfill</string>
<string>uid</string>
<string>result_list</string>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>getattr</string>
<string>None</string>
<string>listbox</string>
<string>addPerson</string>
<string>m2_bis_result</string>
<string>number_list</string>
<string>len</string>
<string>_getiter_</string>
<string>m2</string>
<string>number</string>
<string>associateFirstName</string>
<string>associateLastName</string>
<string>associateBirthday</string>
<string>associateBirthPlace</string>
<string>associateAnotherInfo</string>
<string>administratorFirstName</string>
<string>administratorLastName</string>
<string>administratorBirthday</string>
<string>administratorBirthPlace</string>
<string>administratorAnotherInfo</string>
<string>auditorFirstName</string>
<string>auditorLastName</string>
<string>auditorBirthday</string>
<string>auditorBirthPlace</string>
<string>AuditorAnotherInfo</string>
<string>auditorAnotherInfo</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<int>10</int>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>M2_getFastInputDialogAssignmentList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -88,7 +88,7 @@ for line in listbox:\n
item[\'first_name\'] = line[\'first_name\']\n
item[\'last_name\'] = line[\'last_name\']\n
item[\'start_date\'] = line[\'start_date\']\n
item[\'default_birthplace_address_city\']= line[\'default_birthplace_address_city\']\n
item[\'default_birthplace_address_city\'] = line[\'default_birthplace_address_city\']\n
item[\'function\'] = line[\'function\']\n
item[\'choice\'] = line[\'choice\']\n
item[\'status\'] = line[\'status\']\n
......@@ -114,54 +114,49 @@ for item in items:\n
first_name=item[\'first_name\'],\n
last_name =item[\'last_name\'],\n
start_date=item[\'start_date\'],\n
default_birthplace_address_city=item[\'default_birthplace_address_city\'])\n
person_third_party_assgmnt =person_third_party.newContent(portal_type=\'Assignment\',\n
function=item[\'function\'],\n
destination_form_value=context_obj)\n
person_third_party_assgmnt.openSubmit()\n
default_birthplace_address_city=item[\'default_birthplace_address_city\'],)\n
person_third_party_assignment = \\\n
person_third_party.newContent(portal_type=\'Assignment\',\n
function=item[\'function\'],\n
destination_form_value=context_obj) \n
person_third_party_assignment.openSubmit()\n
else:\n
result_list = portal.portal_catalog(parent_uid=portal.person_module.getUid(),\n
relative_url=item[\'choice\'])\n
\n
for object in result_list:\n
assgment = object.newContent(portal_type=\'Assignment\',\n
person = portal.restrictedTraverse(item[\'choice\'])\n
assignment = person.newContent(portal_type=\'Assignment\',\n
function=item[\'function\'],\n
destination_form_value=context_obj)\n
assgment.openSubmit()\n
assignment.openSubmit()\n
elif item[\'status\'] == \'_action_maintain\':\n
pass\n
elif item[\'status\'] == \'_action_modify\':\n
result_list = [x.getObject() for x in portal.portal_catalog(parent_uid=portal.person_module.getUid(),\n
relative_url=item[\'choice\'])]\n
person = portal.restrictedTraverse(item[\'choice\'])\n
corporate_registration_code = context_obj.getCorporateRegistrationCode()\n
organisation_list = [x.getObject() for x in portal.portal_catalog(parent_uid=portal.organisation_module.getUid(), \n
organisation_list = [organisation.getObject() for organisation in portal.portal_catalog(parent_uid=portal.organisation_module.getUid(), \n
corporate_registration_code=corporate_registration_code)]\n
function_relative_url = \'/\'.join((\'function\', item[\'old_function\']))\n
for org in organisation_list:\n
for object in result_list:\n
destination_uid = context.portal_categories.destination.getUid()\n
asst_list = list(context.portal_catalog(parent_uid=object.getUid(),\n
portal_type=\'Assignment\',\n
function_relative_url=function_relative_url,\n
destination_uid=org.getUid()))\n
for x in asst_list:\n
x.edit(function=item[\'function\'],\n
destination_form_value=context_obj)\n
#function_relative_url = \'/\'.join((\'function\', item[\'old_function\']))\n
for organisation in organisation_list:\n
# XXX for assignment in assignment_list:\n
for assignment in person.contentValues(portal_type=\'Assignment\',\n
checked_permission=\'View\'):\n
if assignment.getValidationState() ==\'open\' and \\\n
assignment.getFunction() == item[\'old_function\'] and \\\n
organisation in assignment.getDestinationValueList():\n
assignment.edit(function=item[\'function\'],\n
destination_value=organisation,)\n
elif item[\'status\']==\'_go_action\':\n
result_list = portal.portal_catalog(parent_uid=portal.person_module.getUid(),\n
relative_url=item[\'choice\'])\n
person = portal.restrictedTraverse(item[\'choice\'])\n
corporate_registration_code = context_obj.getCorporateRegistrationCode()\n
organisation_list = [x.getObject() for x in portal.portal_catalog(parent_uid=portal.organisation_module.getUid(), \n
organisation_list = [organisation.getObject() for organisation in portal.portal_catalog(parent_uid=portal.organisation_module.getUid(), \n
corporate_registration_code=corporate_registration_code)]\n
for org in organisation_list:\n
for object in result_list:\n
destination_uid = context.portal_categories.destination.getUid()\n
asst_list = list(context.portal_catalog(parent_uid=object.getUid(),\n
portal_type=\'Assignment\',\n
destination_uid=org.getUid()))\n
for x in asst_list:\n
x.edit(destination_form_value=context_obj)\n
x.cancel()\n
for organisation in organisation_list:\n
for assignment in person.contentValues(portal_type=\'Assignment\',\n
checked_permission=\'View\'):\n
if assignment.getValidationState() ==\'open\' and \\\n
assignment.getFunction() == item[\'old_function\'] and \\\n
organisation in assignment.getDestinationValueList():\n
assignment.edit(destination_form_value=context_obj)\n
assignment.cancel()\n
\n
role_type = \'Assignment\' \n
if context_obj.getPortalType()==\'M2\':\n
form_id = \'M2_view\'\n
......@@ -252,20 +247,14 @@ return context.REQUEST.RESPONSE.redirect(redirect_url)\n
<string>new_items</string>
<string>person_title</string>
<string>person_third_party</string>
<string>person_third_party_assgmnt</string>
<string>result_list</string>
<string>object</string>
<string>assgment</string>
<string>person_third_party_assignment</string>
<string>person</string>
<string>assignment</string>
<string>corporate_registration_code</string>
<string>append</string>
<string>$append0</string>
<string>x</string>
<string>corporate_registration_code</string>
<string>organisation</string>
<string>organisation_list</string>
<string>function_relative_url</string>
<string>org</string>
<string>destination_uid</string>
<string>list</string>
<string>asst_list</string>
<string>role_type</string>
<string>ignore_layout</string>
<string>editable_mode</string>
......
......@@ -96,20 +96,19 @@
<string>listbox_last_name</string>
<string>listbox_id_card_number</string>
<string>listbox_title</string>
<string>listbox_default_birthplace_city</string>
<string>listbox_status</string>
<string>listbox_choice</string>
<string>listbox_function</string>
<string>listbox_old_function</string>
<string>listbox_start_date</string>
<string>listbox_default_birthplace_address_city</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>listbox_start_date</string>
</list>
<list/>
</value>
</item>
<item>
......
......@@ -437,21 +437,13 @@
<string>Status</string>
</tuple>
<tuple>
<string>function</string>
<string>New Function</string>
</tuple>
<tuple>
<string>old_function</string>
<string>Old Function</string>
<string>last_name</string>
<string>Last Name</string>
</tuple>
<tuple>
<string>first_name</string>
<string>First Name</string>
</tuple>
<tuple>
<string>last_name</string>
<string>Last Name</string>
</tuple>
<tuple>
<string>start_date</string>
<string>Birthday</string>
......@@ -460,6 +452,14 @@
<string>default_birthplace_address_city</string>
<string>Birthplace</string>
</tuple>
<tuple>
<string>function</string>
<string>New Function</string>
</tuple>
<tuple>
<string>old_function</string>
<string>Old Function</string>
</tuple>
<tuple>
<string>id_card_number</string>
<string>ID</string>
......@@ -550,7 +550,7 @@
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>M0_assignment_selection</string> </value>
<value> <string>M2_assignment_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
......@@ -601,7 +601,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>M0_getFastInputDialogAssignmentList</string> </value>
<value> <string>M2_getFastInputDialogAssignmentList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -11,7 +11,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_default_birthplace_city</string> </value>
<value> <string>listbox_default_birthplace_address_city</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>listbox_default_birthplace_city</string> </value>
<value> <string>listbox_default_birthplace_address_city</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
......
......@@ -157,7 +157,9 @@
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
......@@ -303,4 +305,20 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.function, filter_node=1)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -157,7 +157,9 @@
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
......@@ -233,44 +235,7 @@
<item>
<key> <string>items</string> </key>
<value>
<list>
<tuple>
<string encoding="base64">QWN0aW9ubmFpcmUgZGUgc29jacOpdMOp</string>
<string>corporation/shareholder</string>
</tuple>
<tuple>
<string>PDG</string>
<string>corporation/executive/ceo</string>
</tuple>
<tuple>
<string encoding="base64">R8OpcmFudA==</string>
<string>corporation/executive/manager</string>
</tuple>
<tuple>
<string>Administrateur</string>
<string>corporation/executive/trustee</string>
</tuple>
<tuple>
<string>Personne Morale/GIE/Pr\xc3\xa9sident</string>
<string>gie/president</string>
</tuple>
<tuple>
<string>Personne Morale/GIE/Vice Pr\xc3\xa9sident</string>
<string>gie/vice_president</string>
</tuple>
<tuple>
<string>Personne Morale/GIE/Secretaire G\xc3\xa9n\xc3\xa9ral</string>
<string>gie/secretary_general</string>
</tuple>
<tuple>
<string>Personne Morale/GIE/Tr\xc3\xa9sorier</string>
<string>gie/treasurer</string>
</tuple>
<tuple>
<string>Commissaire au Comptes</string>
<string>accounting/auditor</string>
</tuple>
</list>
<list/>
</value>
</item>
<item>
......@@ -299,4 +264,20 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.function, filter_node=1)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -126,15 +126,26 @@ new_registry_number = request_eform.portal_ids.generateNewId(method=attachLocati
activity_list=[]\n
organisation_list = [organisation.getObject() for organisation in \\\n
organisation_module.searchFolder(corporate_registration_code=corporate_registration_code)]\n
context.log(organisation_list)\n
for organisation in organisation_list:\n
if organisation.getActivityFreeText()!= None:\n
activity_list = organisation.getActivityFreeText().split(\',\')\n
person_module = request_eform.getPortalObject().person_module\n
#destination_form_uid = request_eform.portal_categories.destination_form.getUid()\n
#person_object_list = [person.getObject() for person in context.portal_catalog(portal_type = \'Assignment\',\n
# destination_form_uid = request_eform.getUid())]\n
#for person_object in person_object_list:\n
# person_object.edit(destination_value = organisation)\n
\n
# Open all assignemnts that are in open_submitted state\n
destination_form_uid = context.portal_categories.destination_form.getUid()\n
#assignment_list = [assignment.getObject() for assignment in context.portal_catalog(portal_type=\'Assignment\',\n
#validation_state = \'open_submitted\',\n
#destination_form_uid = request_eform.getUid())]\n
assignment_list = [assignment for assignment in \\\n
organisation.getDestinationRelatedValueList() if \\\n
assignment.getValidationState()==\'open_submitted\']\n
context.log(assignment_list)\n
for assignment in assignment_list:\n
context.log(assignment)\n
assignment.open()\n
assignment.edit(destination_value=organisation,\n
corporate_registration_code=new_registry_number)\n
\n
if request_eform.getMoralPersonCheck():\n
if request_eform.getCharacteristicsCheck():\n
for property, value in caracteristic_property_dict.items():\n
......@@ -292,7 +303,11 @@ for m2_bis in m2_bis_list:\n
<string>_getiter_</string>
<string>organisation</string>
<string>organisation_list</string>
<string>context</string>
<string>None</string>
<string>destination_form_uid</string>
<string>assignment</string>
<string>assignment_list</string>
<string>property</string>
<string>value</string>
<string>removed_activity_list</string>
......
853
\ No newline at end of file
858
\ 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