Commit 60ef9abc authored by Aurel's avatar Aurel

many workflow modifications

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8539 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 90531030
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Confirmed for cash administrator</string> </value> <value> <string>Confirmed By Initiator</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Terminate the operation</string> </value> <value> <string>Validated</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
......
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
<tuple> <tuple>
<string>cancel</string> <string>cancel</string>
<string>cancel_action</string> <string>cancel_action</string>
<string>order</string> <string>confirm</string>
<string>order_action</string> <string>confirm_action</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.States</string>
<string>StateDefinition</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>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ordered</string> </value>
</item>
<item>
<key> <string>permission_roles</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Confirmed for teller particular</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>cancel</string>
<string>cancel_action</string>
<string>confirm</string>
<string>confirm_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</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>
<item>
<key> <string>Access contents information</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>View</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -100,8 +100,6 @@ ...@@ -100,8 +100,6 @@
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
<string>DestinationAssignee</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -92,8 +92,6 @@ ...@@ -92,8 +92,6 @@
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
<string>Assignee</string> <string>Assignee</string>
<string>DestinationAssignee</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Assign To Cash Administrator</string> </value> <value> <string>Assign To Controler</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
...@@ -90,7 +90,8 @@ ...@@ -90,7 +90,8 @@
<value> <value>
<tuple> <tuple>
<string>Manager</string> <string>Manager</string>
<string>Assignee</string> <string>Assignor</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Assign To Cash Administrator </string> </value> <value> <string>Assign To Controler Action</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Assign To Cash Administrator Action</string> </value> <value> <string>Assign To Controler Action</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
...@@ -89,7 +89,8 @@ ...@@ -89,7 +89,8 @@
<key> <string>roles</string> </key> <key> <string>roles</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string> <string>Assignor</string>
<string>Owner</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
</value> </value>
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<key> <string>roles</string> </key> <key> <string>roles</string> </key>
<value> <value>
<tuple> <tuple>
<string>DestinationAssignee</string> <string>Assignee</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
</value> </value>
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<key> <string>roles</string> </key> <key> <string>roles</string> </key>
<value> <value>
<tuple> <tuple>
<string>DestinationAssignee</string> <string>Assignee</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
</value> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</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>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Assign To Teller Particular</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>order</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>ordered</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Assign To Teller Particular</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</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>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Assign To Teller Particular</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?workflow_action=order_action</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>order</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>order_action</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string>validateVaultBalance</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Assign To Teller Particular Action</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -76,6 +76,19 @@ from Products.ERP5Type.Message import Message\n ...@@ -76,6 +76,19 @@ from Products.ERP5Type.Message import Message\n
transaction = state_change.object\n transaction = state_change.object\n
\n \n
vault = transaction.getSource()\n vault = transaction.getSource()\n
date = transaction.getStartDate()\n
\n
# check we are in an opened accounting day\n
if not transaction.Baobab_checkCounterDateOpen(site=vault, date=date):\n
msg = Message(domain = "ui", message="Counter Date is not opened")\n
raise ValidationFailed, (msg,)\n
\n
# check counter is opened\n
site = transaction.getSourceValue()\n
if not context.Baobab_checkCounterOpened(site):\n
msg = Message(domain = "ui", message="Counter is not opened")\n
raise ValidationFailed, (msg,)\n
\n
resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_type=\'Cash Delivery Line\')\n resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_type=\'Cash Delivery Line\')\n
\n \n
# Get price and total_price.\n # Get price and total_price.\n
...@@ -141,10 +154,13 @@ elif resource <> 0 :\n ...@@ -141,10 +154,13 @@ elif resource <> 0 :\n
<string>_getattr_</string> <string>_getattr_</string>
<string>transaction</string> <string>transaction</string>
<string>vault</string> <string>vault</string>
<string>date</string>
<string>msg</string>
<string>site</string>
<string>context</string>
<string>resource</string> <string>resource</string>
<string>amount</string> <string>amount</string>
<string>total_price</string> <string>total_price</string>
<string>msg</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -76,6 +76,13 @@ object = state_change.object\n ...@@ -76,6 +76,13 @@ object = state_change.object\n
if not \'encaisse_des_devises\' in object.getDestination():\n if not \'encaisse_des_devises\' in object.getDestination():\n
msg = Message(domain="ui", msg="Wrong Destination Selected.")\n msg = Message(domain="ui", msg="Wrong Destination Selected.")\n
raise validationFailed, (msg,)\n raise validationFailed, (msg,)\n
\n
object_price = object.getSourceTotalAssetPrice()\n
line_price = object.getTotalPrice(deliveryLineType=\'Cash Delivery Line\')\n
\n
if object_price != line_price:\n
msg = Message(domain="ui", msg="Amount differs between document and lines.")\n
raise validationFailed, (msg,)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -86,7 +93,7 @@ if not \'encaisse_des_devises\' in object.getDestination():\n ...@@ -86,7 +93,7 @@ if not \'encaisse_des_devises\' in object.getDestination():\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_workflow/foreign_cash_reception_workflow/scripts/checkDestination</string> </value> <value> <string>Script (Python):/baobab/portal_workflow/foreign_cash_reception_workflow/scripts/checkConsistency</string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
...@@ -125,6 +132,8 @@ if not \'encaisse_des_devises\' in object.getDestination():\n ...@@ -125,6 +132,8 @@ if not \'encaisse_des_devises\' in object.getDestination():\n
<string>object</string> <string>object</string>
<string>msg</string> <string>msg</string>
<string>validationFailed</string> <string>validationFailed</string>
<string>object_price</string>
<string>line_price</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -141,7 +150,7 @@ if not \'encaisse_des_devises\' in object.getDestination():\n ...@@ -141,7 +150,7 @@ if not \'encaisse_des_devises\' in object.getDestination():\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>checkDestination</string> </value> <value> <string>checkConsistency</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>script_name</string> </key>
<value> <string>checkDestination</string> </value> <value> <string>checkConsistency</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Assigned To Vault Controler</string> </value> <value> <string>Assigned To Remote Site Vault Controller</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Validated</string> </value> <value> <string>Delivered</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string>Assigned To Vault Manager</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
...@@ -81,39 +81,39 @@ ...@@ -81,39 +81,39 @@
<item> <item>
<key> <string>Access contents information</string> </key> <key> <string>Access contents information</string> </key>
<value> <value>
<list> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>DestinationAssignor</string> <string>DestinationAssignor</string>
<string>Manager</string> <string>Manager</string>
</list> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>Add portal content</string> </key> <key> <string>Add portal content</string> </key>
<value> <value>
<list> <tuple>
<string>Manager</string> <string>Manager</string>
</list> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>Modify portal content</string> </key> <key> <string>Modify portal content</string> </key>
<value> <value>
<list> <tuple>
<string>Manager</string> <string>Manager</string>
</list> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>View</string> </key> <key> <string>View</string> </key>
<value> <value>
<list> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>DestinationAssignor</string> <string>DestinationAssignor</string>
<string>Manager</string> <string>Manager</string>
</list> </tuple>
</value> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string>Validated By Vault Manager</string> </value>
</item> </item>
<item> <item>
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
...@@ -83,37 +83,37 @@ ...@@ -83,37 +83,37 @@
<item> <item>
<key> <string>Access contents information</string> </key> <key> <string>Access contents information</string> </key>
<value> <value>
<list> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
</list> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>Add portal content</string> </key> <key> <string>Add portal content</string> </key>
<value> <value>
<list> <tuple>
<string>Manager</string> <string>Manager</string>
</list> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>Modify portal content</string> </key> <key> <string>Modify portal content</string> </key>
<value> <value>
<list> <tuple>
<string>Manager</string> <string>Manager</string>
</list> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>View</string> </key> <key> <string>View</string> </key>
<value> <value>
<list> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
</list> </tuple>
</value> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
<string>Assignor</string> <string>Assignor</string>
<string>DestinationAssignor</string> <string>DestinationAssignor</string>
<string>DestinationAssignee</string> <string>DestinationAssignee</string>
<string>Assignee</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
</value> </value>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Assign To Remote Site Vault Controler</string> </value> <value> <string>Assign To Remote Site Vault Controller</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Assign To Remote Site Vault Controler</string> </value> <value> <string>Assign To Remote Site Vault Controller</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Assign To Remote Site Vault Controler </string> </value> <value> <string>Assign To Remote Site Vault Controller </string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Assign To Remote Site Vault Controler Action</string> </value> <value> <string>Assign To Remote Site Vault Controller Action</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
......
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
<value> <value>
<tuple> <tuple>
<string>DestinationAssignee</string> <string>DestinationAssignee</string>
<string>Assignee</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
</value> </value>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Validated By Vault Manager</string> </value> <value> <string>Assign To Vault Controler</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Validated By Vault Manager</string> </value> <value> <string>Assign To Vault Controler</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
...@@ -91,7 +91,6 @@ ...@@ -91,7 +91,6 @@
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Validated By Vault Manager</string> </value> <value> <string>Assign To Vault Controler</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Validated By Vault Manager Action</string> </value> <value> <string>Assign To Vault Controler Action</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
...@@ -91,7 +91,6 @@ ...@@ -91,7 +91,6 @@
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>actbox_name</string> </key>
<value> <string>Validated By Vault Controler</string> </value> <value> <string>Validate</string> </value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Validated By Vault Controler Action</string> </value> <value> <string>Validate Action</string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>trigger_type</string> </key>
......
...@@ -74,8 +74,20 @@ from Products.DCWorkflow.DCWorkflow import ValidationFailed\n ...@@ -74,8 +74,20 @@ from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
\n \n
transaction = state_change.object\n transaction = state_change.object\n
\n
vault = transaction.getSource()\n vault = transaction.getSource()\n
date = transaction.getStartDate()\n
\n
# check we are in an opened accounting day\n
if not transaction.Baobab_checkCounterDateOpen(site=vault, date=date):\n
msg = Message(domain = "ui", message="Counter Date is not opened")\n
raise ValidationFailed, (msg,)\n
\n
# check counter is opened\n
site = transaction.getSourceValue()\n
if not context.Baobab_checkCounterOpened(site):\n
msg = Message(domain = "ui", message="Counter is not opened")\n
raise ValidationFailed, (msg,)\n
\n
resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_type=\'Cash Delivery Line\')\n resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_type=\'Cash Delivery Line\')\n
\n \n
# Get price and total_price.\n # Get price and total_price.\n
...@@ -141,10 +153,13 @@ elif resource <> 0 :\n ...@@ -141,10 +153,13 @@ elif resource <> 0 :\n
<string>_getattr_</string> <string>_getattr_</string>
<string>transaction</string> <string>transaction</string>
<string>vault</string> <string>vault</string>
<string>date</string>
<string>msg</string>
<string>site</string>
<string>context</string>
<string>resource</string> <string>resource</string>
<string>amount</string> <string>amount</string>
<string>total_price</string> <string>total_price</string>
<string>msg</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -74,8 +74,19 @@ from Products.DCWorkflow.DCWorkflow import ValidationFailed\n ...@@ -74,8 +74,19 @@ from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
\n \n
transaction = state_change.object\n transaction = state_change.object\n
\n
vault = transaction.getSource()\n vault = transaction.getSource()\n
date = transaction.getStartDate()\n
# check we are in an opened accounting day\n
if not transaction.Baobab_checkCounterDateOpen(site=vault, date=date):\n
msg = Message(domain = "ui", message="Counter Date is not opened")\n
raise ValidationFailed, (msg,)\n
\n
# check counter is opened\n
site = transaction.getSourceValue()\n
if not context.Baobab_checkCounterOpened(site):\n
msg = Message(domain = "ui", message="Counter is not opened")\n
raise ValidationFailed, (msg,)\n
\n
resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_type=\'Cash Delivery Line\')\n resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_type=\'Cash Delivery Line\')\n
\n \n
# Get price and total_price.\n # Get price and total_price.\n
...@@ -141,10 +152,13 @@ elif resource <> 0 :\n ...@@ -141,10 +152,13 @@ elif resource <> 0 :\n
<string>_getattr_</string> <string>_getattr_</string>
<string>transaction</string> <string>transaction</string>
<string>vault</string> <string>vault</string>
<string>date</string>
<string>msg</string>
<string>site</string>
<string>context</string>
<string>resource</string> <string>resource</string>
<string>amount</string> <string>amount</string>
<string>total_price</string> <string>total_price</string>
<string>msg</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
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