Commit 9e2b2e0c authored by Jérome Perrin's avatar Jérome Perrin

Store the assignee as a workflow variable, which allows to use the...

Store the assignee as a workflow variable, which allows to use the 'affectInvoice' script as an after script of the "logic transition", because this script is definitivly logic and not UI.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11555 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 99c7259e
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
<?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>
48
\ No newline at end of file
50
\ 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