Commit 1fba4c3b authored by Aurel's avatar Aurel

2006-08-10 aurel

* improve check payment :
- fix cash status in fast input
- more explicit message when workflow validation failed
- add script to check if bank account is overdraft facility before sending to manual validation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9120 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d64069fe
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>cash_detail_dict = {\'line_portal_type\' : \'Cash Delivery Line\'\n <value> <string>cash_detail_dict = {\'line_portal_type\' : \'Cash Delivery Line\'\n
, \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID()\n , \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID()\n
, \'cash_status_list\' : [\'valid\']\n , \'cash_status_list\' : [\'valid\', \'new_emitted\']\n
, \'emission_letter_list\' : context.Baobab_getUserEmissionLetterList()\n , \'emission_letter_list\' : context.Baobab_getUserEmissionLetterList()\n
, \'variation_list\' : context.Baobab_getResourceVintageList(coin=1, banknote=1)\n , \'variation_list\' : context.Baobab_getResourceVintageList(coin=1, banknote=1)\n
, \'currency_cash_portal_type\' : None\n , \'currency_cash_portal_type\' : None\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<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>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n
\n
txn = state_change[\'object\']\n
\n
account = txn.getDestinationPaymentValue()\n
\n
if not account.isOverdraftFacility():\n
msg = Message(domain=\'ui\', message="Can\'t sent to manual validation because of not averdraft facility for this bank account")\n
raise ValidationFailed, (msg,)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_workflow/check_payment_workflow/scripts/checkAccountIsOverdraftFacility</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>state_change</string>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>_getitem_</string>
<string>txn</string>
<string>_getattr_</string>
<string>account</string>
<string>msg</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>checkAccountIsOverdraftFacility</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -104,13 +104,13 @@ if resource == 3:\n ...@@ -104,13 +104,13 @@ if resource == 3:\n
msg = Message(domain="ui", message="No banknote or coin defined.")\n msg = Message(domain="ui", message="No banknote or coin defined.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
elif resource == 2:\n elif resource == 2:\n
msg = Message(domain="ui", message="No resource.")\n msg = Message(domain="ui", message="No resource defined.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
elif price != cash_detail:\n elif price != cash_detail:\n
msg = Message(domain="ui", message="Amount differs from input.")\n msg = Message(domain="ui", message="Amount differs from input.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
elif resource == 1:\n elif resource == 1:\n
msg = Message(domain="ui", message="Insufficient Balance.")\n msg = Message(domain="ui", message="Insufficient Balance in counter.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
</string> </value> </string> </value>
</item> </item>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>script_name</string> </key>
<value> <string></string> </value> <value> <string>checkAccountIsOverdraftFacility</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
2006-08-10 aurel
* improve check payment :
- fix cash status in fast input
- more explicit message when workflow validation failed
- add script to check if bank account is overdraft facility before sending to manual validation
2006-07-25 Seb
* cleanup, remove skins with bad names
2006-04-12 aurel 2006-04-12 aurel
* move some skins * move some skins
......
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