[Erp5-report] r17930 - in /erp5/trunk/bt5/erp5_banking_check: SkinTemplateItem/portal_skins...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Nov 30 16:41:37 CET 2007
Author: aurel
Date: Fri Nov 30 16:41:37 2007
New Revision: 17930
URL: http://svn.erp5.org?rev=17930&view=rev
Log:
update check payment in order to follow new specifications
Modified:
erp5/trunk/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Base_checkCheck.xml
erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml
erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/states/draft.xml
erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/states/planned.xml
erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order_action.xml
erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan_action.xml
erp5/trunk/bt5/erp5_banking_check/bt/revision
Modified: erp5/trunk/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Base_checkCheck.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Base_checkCheck.xml?rev=17930&r1=17929&r2=17930&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Base_checkCheck.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/Base_checkCheck.xml Fri Nov 30 16:41:37 2007
@@ -69,7 +69,8 @@
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
# Check that a check exists for given bank account and reference.\n
-check = context.Base_checkOrCreateCheck(reference=reference, \n
+if check is None:\n
+ check = context.Base_checkOrCreateCheck(reference=reference, \n
bank_account=bank_account,\n
resource=resource)\n
\n
@@ -109,7 +110,7 @@
</item>
<item>
<key> <string>_params</string> </key>
- <value> <string>bank_account, reference, resource</string> </value>
+ <value> <string>bank_account, reference, resource, check=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
@@ -129,7 +130,7 @@
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
- <value> <int>3</int> </value>
+ <value> <int>4</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
@@ -138,13 +139,14 @@
<string>bank_account</string>
<string>reference</string>
<string>resource</string>
+ <string>check</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
+ <string>None</string>
<string>_getattr_</string>
<string>context</string>
- <string>check</string>
<string>bad_simulation_state_dict</string>
<string>simulation_state</string>
<string>_getitem_</string>
@@ -160,7 +162,9 @@
<item>
<key> <string>func_defaults</string> </key>
<value>
- <none/>
+ <tuple>
+ <none/>
+ </tuple>
</value>
</item>
<item>
Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml?rev=17930&r1=17929&r2=17930&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml Fri Nov 30 16:41:37 2007
@@ -139,6 +139,20 @@
transaction.edit(aggregate=check.getRelativeUrl())\n
\n
context.updateBankingOperation(state_change)\n
+\n
+# Test if the account balance is sufficient.\n
+# We do not need to serialize here because we do not make\n
+# reservation yet\n
+error = transaction.BankAccount_checkAvailableBalance(bank_account.getRelativeUrl(), price)\n
+if error[\'error_code\'] == 1:\n
+ msg = Message(domain=\'ui\', message="Bank account is not sufficient.")\n
+ raise ValidationFailed, (msg,)\n
+elif error[\'error_code\'] == 2:\n
+ msg = Message(domain=\'ui\', message="Bank account is not valid.")\n
+ raise ValidationFailed, (msg,)\n
+elif error[\'error_code\'] != 0:\n
+ msg = Message(domain=\'ui\', message="Unknown error code.")\n
+ raise ValidationFailed, (msg,)\n
]]></string> </value>
@@ -216,6 +230,7 @@
<string>check_resource</string>
<string>check</string>
<string>context</string>
+ <string>error</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/states/draft.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/states/draft.xml?rev=17930&r1=17929&r2=17930&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/states/draft.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/states/draft.xml Fri Nov 30 16:41:37 2007
@@ -41,6 +41,8 @@
<string>cancel_action</string>
<string>delete</string>
<string>delete_action</string>
+ <string>order</string>
+ <string>order_action</string>
<string>plan</string>
<string>plan_action</string>
</tuple>
Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/states/planned.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/states/planned.xml?rev=17930&r1=17929&r2=17930&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/states/planned.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/states/planned.xml Fri Nov 30 16:41:37 2007
@@ -86,7 +86,6 @@
<key> <string>Add portal content</string> </key>
<value>
<tuple>
- <string>Assignee</string>
<string>Manager</string>
</tuple>
</value>
@@ -95,7 +94,6 @@
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
- <string>Assignee</string>
<string>Manager</string>
</tuple>
</value>
Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order_action.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order_action.xml?rev=17930&r1=17929&r2=17930&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order_action.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/order_action.xml Fri Nov 30 16:41:37 2007
@@ -79,6 +79,7 @@
<tuple>
<string>Manager</string>
<string>Assignee</string>
+ <string>Assignor</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan_action.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan_action.xml?rev=17930&r1=17929&r2=17930&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan_action.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/transitions/plan_action.xml Fri Nov 30 16:41:37 2007
@@ -21,7 +21,7 @@
</item>
<item>
<key> <string>actbox_name</string> </key>
- <value> <string>Check Consistency</string> </value>
+ <value> <string>Send to Validation</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
Modified: erp5/trunk/bt5/erp5_banking_check/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/bt/revision?rev=17930&r1=17929&r2=17930&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/bt/revision (original)
+++ erp5/trunk/bt5/erp5_banking_check/bt/revision Fri Nov 30 16:41:37 2007
@@ -1,1 +1,1 @@
-343
+344
More information about the Erp5-report
mailing list