diff --git a/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow.xml b/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow.xml index 61efec82335570351945f92de41c5ba0d64048ab..558ca0ee953d4e60c9af5aadecccb5c8886cd561 100644 --- a/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow.xml +++ b/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow.xml @@ -30,6 +30,16 @@ <none/> </value> </item> + <item> + <key> <string>creation_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>groups</string> </key> <value> @@ -44,6 +54,10 @@ <key> <string>initial_state</string> </key> <value> <string>draft</string> </value> </item> + <item> + <key> <string>manager_bypass</string> </key> + <value> <int>0</int> </value> + </item> <item> <key> <string>permissions</string> </key> <value> diff --git a/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/scripts/affectInvoices.xml b/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/scripts/affectInvoices.xml index baa09f6b4e3c004edb59d36c8ce11bc253a1e1b5..54072d46708718db50a6fed4b81a8e6940b6de23 100644 --- a/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/scripts/affectInvoices.xml +++ b/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/scripts/affectInvoices.xml @@ -70,11 +70,14 @@ <key> <string>_body</string> </key> <value> <string>"""Affect this transmission sheet and all related invoices\n """\n +from DateTime import DateTime\n +\n transmission_sheet = sci[\'object\']\n -agent = sci[\'kwargs\'][\'agent\']\n portal = transmission_sheet.getPortalObject()\n +agent = portal.portal_workflow.getInfoFor(transmission_sheet, \'assignee\')\n \n transmission_sheet.setSourceAdministration(agent)\n +transmission_sheet.setVisaDate(DateTime())\n transmission_sheet.updateLocalRolesOnSecurityGroups()\n \n for invoice in transmission_sheet.getAggregateRelatedValueList(\n @@ -148,11 +151,12 @@ for invoice in transmission_sheet.getAggregateRelatedValueList(\n <value> <tuple> <string>sci</string> + <string>DateTime</string> <string>_getitem_</string> <string>transmission_sheet</string> - <string>agent</string> <string>_getattr_</string> <string>portal</string> + <string>agent</string> <string>_getiter_</string> <string>invoice</string> </tuple> diff --git a/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/transitions/affect.xml b/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/transitions/affect.xml index 3935f74fdafca950da35f6ff349418a07cd748fe..e0e3ae59158478225396660cf0c14c832dd75ae4 100644 --- a/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/transitions/affect.xml +++ b/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/transitions/affect.xml @@ -38,7 +38,7 @@ </item> <item> <key> <string>after_script_name</string> </key> - <value> <string></string> </value> + <value> <string>affectInvoices</string> </value> </item> <item> <key> <string>description</string> </key> diff --git a/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/transitions/affect_action.xml b/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/transitions/affect_action.xml index a602c2d83c5dc7b64e5bf1666344aa9648279891..02c2cc166c248218b72a8ed1d63eeb4fa7b6b769 100644 --- a/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/transitions/affect_action.xml +++ b/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/transitions/affect_action.xml @@ -60,7 +60,7 @@ </item> <item> <key> <string>script_name</string> </key> - <value> <string>affectInvoices</string> </value> + <value> <string></string> </value> </item> <item> <key> <string>title</string> </key> @@ -70,6 +70,12 @@ <key> <string>trigger_type</string> </key> <value> <int>1</int> </value> </item> + <item> + <key> <string>var_exprs</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> </dictionary> </pickle> </record> @@ -96,4 +102,51 @@ </dictionary> </pickle> </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <tuple> + <string>Persistence</string> + <string>PersistentMapping</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_container</string> </key> + <value> + <dictionary> + <item> + <key> <string>assignee</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> + </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="4" aka="AAAAAAAAAAQ="> + <pickle> + <tuple> + <tuple> + <string>Products.CMFCore.Expression</string> + <string>Expression</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>python: kwargs.get(\'agent\')</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/variables/assignee.xml b/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/variables/assignee.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f2eda6b502c6d1024a38737f335e0efa995491a --- /dev/null +++ b/bt5/erp5_accounting_l10n_fr_m9/WorkflowTemplateItem/portal_workflow/transmission_sheet_workflow/variables/assignee.xml @@ -0,0 +1,66 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.DCWorkflow.Variables</string> + <string>VariableDefinition</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>default_expr</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>default_value</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>for_catalog</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>for_status</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>assignee</string> </value> + </item> + <item> + <key> <string>info_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>update_always</string> </key> + <value> <int>0</int> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting_l10n_fr_m9/bt/revision b/bt5/erp5_accounting_l10n_fr_m9/bt/revision index 31ff414b74c276a48419201e1024d3b860413a3b..c5b431b6cba29540b4b284840ff229bce0460886 100644 --- a/bt5/erp5_accounting_l10n_fr_m9/bt/revision +++ b/bt5/erp5_accounting_l10n_fr_m9/bt/revision @@ -1 +1 @@ -48 \ No newline at end of file +50 \ No newline at end of file