Commit 8ebe18d2 authored by Vincent Pelletier's avatar Vincent Pelletier

Add the possibility for use to define a stop payment lift date when requesting...

Add the possibility for use to define a stop payment lift date when requesting the lift (change workflow state change template, add setter call in workflow action script).
Dislay that date on the document after lift was requested.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24971 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4b5e05a5
......@@ -98,6 +98,7 @@
<string>my_source_reference</string>
<string>my_source_logical_path</string>
<string>my_start_date</string>
<string>my_stop_date</string>
<string>my_debit_required</string>
<string>my_source_total_asset_price</string>
</list>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Workflow_statusModify</string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_comment</string>
<string>your_stop_date</string>
<string>my_workflow_action</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>StopPayment_viewStopWorkflowActionDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>CashMovement_viewStopWorkflowActionDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validate Workflow Action</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -97,6 +97,12 @@ for movement in movement_list:\n
raise ValidationFailed, (msg,)\n
debit_required = transaction.isDebitRequired()\n
if debit_required:\n
stop_date = state_change.kwargs.get(\'stop_date\')\n
if \'stop_date\' is None:\n
msg = Message(domain = "ui", message="No stop date provided")\n
raise ValidationFailed, (msg,)\n
transaction.setStopDate(stop_date)\n
\n
# Source and destination will be updated automaticaly based on the category of bank account\n
# The default account chosen should act as some kind of *temp* account or *parent* account\n
movement = transaction.get(\'lift_movement\',None)\n
......@@ -179,6 +185,7 @@ if debit_required:\n
<string>aggregate_value_list</string>
<string>item</string>
<string>debit_required</string>
<string>stop_date</string>
<string>bank_account</string>
</tuple>
</value>
......
......@@ -25,7 +25,7 @@
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?workflow_action=debit_stop_action</string> </value>
<value> <string>%(content_url)s/StopPayment_viewStopWorkflowActionDialog?workflow_action=debit_stop_action</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
......@@ -67,11 +67,8 @@
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -97,11 +94,8 @@
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......
414
\ No newline at end of file
415
\ 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