Commit 882cf9f8 authored by Vincent Pelletier's avatar Vincent Pelletier

Make validateVaultBalance call [...]_checkPath script, just as it is done in...

Make validateVaultBalance call [...]_checkPath script, just as it is done in cash_movement_workflow.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28866 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 30e90458
...@@ -85,6 +85,13 @@ transaction.log(\'vliste\', vliste)\n ...@@ -85,6 +85,13 @@ transaction.log(\'vliste\', vliste)\n
if len(vliste) != 0:\n if len(vliste) != 0:\n
raise ValidationFailed, (vliste[0].getMessage(),)\n raise ValidationFailed, (vliste[0].getMessage(),)\n
\n \n
portal_type_with_no_space = transaction.getPortalType().replace(\' \',\'\')\n
check_path_script = getattr(transaction,\'%s_checkPath\' % portal_type_with_no_space,None)\n
if check_path_script is not None:\n
message = check_path_script()\n
if message is not None:\n
raise ValidationFailed, (message,)\n
\n
resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_type=\'Cash Movement New Not Emitted Line\')\n resource = transaction.CashDelivery_checkCounterInventory(source=vault, portal_type=\'Cash Movement New Not Emitted Line\')\n
\n \n
\n \n
...@@ -157,6 +164,11 @@ elif resource <> 0 :\n ...@@ -157,6 +164,11 @@ elif resource <> 0 :\n
<string>vaultDestination</string> <string>vaultDestination</string>
<string>vliste</string> <string>vliste</string>
<string>len</string> <string>len</string>
<string>portal_type_with_no_space</string>
<string>getattr</string>
<string>None</string>
<string>check_path_script</string>
<string>message</string>
<string>resource</string> <string>resource</string>
<string>amount</string> <string>amount</string>
<string>total_price</string> <string>total_price</string>
......
672 675
\ No newline at end of file \ 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