Commit 1a3300df authored by Vincent Pelletier's avatar Vincent Pelletier

BankAccount_isOpened is to be called on payment_value in the 2 caller scripts,...

BankAccount_isOpened is to be called on payment_value in the 2 caller scripts, not on context. This denotes a naming convention violation, as those scripts are called "BankAccount_*".
Remove payment_state variable as it's now unused.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28840 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e5e403dc
......@@ -77,9 +77,8 @@ manual_validation_account_category_list = (\'test\',)\n
# First check that the payment account is in an acceptable state\n
#payment_state = context.portal_workflow.getInfoFor(ob=payment, name=\'simulation_state\', wf_id=workflow_id)\n
payment_value = context.restrictedTraverse(payment)\n
payment_state = payment_value.getValidationState()\n
\n
if not context.BankAccount_isOpened():\n
if not payment_value.BankAccount_isOpened():\n
return {\'error_code\':2} # closed account\n
\n
resource = payment_value.getPriceCurrencyValue()\n
......@@ -166,7 +165,6 @@ return {\'error_code\':0, \'balance\':account_balance} # ok\n
<string>_getattr_</string>
<string>context</string>
<string>payment_value</string>
<string>payment_state</string>
<string>resource</string>
<string>None</string>
<string>AttributeError</string>
......
......@@ -74,9 +74,8 @@ manual_validation_account_category_list = (\'test\',)\n
\n
# First check that the payment account is in an acceptable state\n
payment_value = context.restrictedTraverse(payment)\n
payment_state = payment_value.getValidationState()\n
\n
if not context.BankAcocunt_isOpened():\n
if not payment_value.BankAccount_isOpened():\n
return {\'error_code\':2} # closed account\n
\n
resource = payment_value.getPriceCurrencyValue()\n
......@@ -159,7 +158,6 @@ return {\'error_code\':0, \'balance\':account_balance} # ok\n
<string>_getattr_</string>
<string>context</string>
<string>payment_value</string>
<string>payment_state</string>
<string>resource</string>
<string>None</string>
<string>AttributeError</string>
......
489
\ No newline at end of file
493
\ 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