Commit 12482c31 authored by Aurel's avatar Aurel

update script to add vault automatically

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7436 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f28affbe
...@@ -72,15 +72,18 @@ source = context.getSource()\n ...@@ -72,15 +72,18 @@ source = context.getSource()\n
baobab_source = None\n baobab_source = None\n
# Get the history of the workflow\n # Get the history of the workflow\n
user_id=\'None\'\n user_id=\'None\'\n
for workflow_item in context.Base_getWorkflowHistoryItemList(\'check_payment_workflow\'):\n context.log(\'workflow_item_list:\',context.Base_getWorkflowHistoryItemList(\'check_payment_workflow\',display=0))\n
if workfow_item[\'action\']==\'deliver\':\n for workflow_item in context.Base_getWorkflowHistoryItemList(\'check_payment_workflow\',display=0):\n
user_id=workflow_item[\'actor\']\n context.log(\'workflow_item.getProperty(action)\',workflow_item.getProperty(\'action\'))\n
if workflow_item.getProperty(\'action\')==\'deliver_action\':\n
user_id=workflow_item.getProperty(\'actor\')\n
context.log(\'user_id\',user_id)\n
site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n
context.log(\'CheckPayment_getBaobabSource site_list\',site_list)\n context.log(\'CheckPayment_getBaobabSource site_list\',site_list)\n
for site in site_list:\n for site in site_list:\n
site_value = context.portal_categories.getCategoryValue(site)\n site_value = context.portal_categories.getCategoryValue(site)\n
if site_value.getVault().endswith(\'guichet\') and source in site:\n if site_value.getVaultType().endswith(\'guichet\') and source in site:\n
baobab_source = site\n baobab_source = site + \'/encaisse_des_billets_et_monnaies/sortante\'\n
break\n break\n
return baobab_source\n return baobab_source\n
</string> </value> </string> </value>
...@@ -91,6 +94,12 @@ return baobab_source\n ...@@ -91,6 +94,12 @@ return baobab_source\n
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_check_operation/CheckPayment_getBaobabSource</string> </value> <value> <string>Script (Python):/baobab/portal_skins/erp5_banking_check_operation/CheckPayment_getBaobabSource</string> </value>
...@@ -138,8 +147,6 @@ return baobab_source\n ...@@ -138,8 +147,6 @@ return baobab_source\n
<string>user_id</string> <string>user_id</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>workflow_item</string> <string>workflow_item</string>
<string>_getitem_</string>
<string>workfow_item</string>
<string>site_list</string> <string>site_list</string>
<string>site</string> <string>site</string>
<string>site_value</string> <string>site_value</string>
...@@ -170,4 +177,25 @@ return baobab_source\n ...@@ -170,4 +177,25 @@ return baobab_source\n
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
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