Commit fdd9cced authored by Sebastien Robin's avatar Sebastien Robin

fixed attribute error

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10718 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1b6a7b1a
......@@ -88,7 +88,7 @@ if not transaction.Baobab_checkCounterDateOpen(site=source, date=date):\n
# if so, this means that we are saling such kinds of check, thus\n
# we must change the position of the customer account\n
movement_list = transaction.getMovementList()\n
total_debit = context.getSourceTotalAssetPrice()\n
total_debit = transaction.getSourceTotalAssetPrice()\n
for movement in movement_list:\n
aggregate_value_list = movement.getAggregateValueList()\n
for item in aggregate_value_list:\n
......@@ -122,15 +122,15 @@ if debit_required:\n
bank_account.serialize()\n
\n
# Make sure there are no other operations pending for this account\n
if context.BankAccount_isMessagePending(bank_account):\n
if transaction.BankAccount_isMessagePending(bank_account):\n
msg = Message(domain=\'ui\', message="There are operations pending for this account that prevent form calculating its position. Please try again later.")\n
raise ValidationFailed, (msg,)\n
\n
# Index the banking operation line so it impacts account position\n
context.BankingOperationLine_index(line)\n
transaction.BankingOperationLine_index(line)\n
\n
# Test if the account balance is sufficient.\n
error = context.BankAccount_checkBalance(bank_account.getRelativeUrl(), total_debit)\n
error = transaction.BankAccount_checkBalance(bank_account.getRelativeUrl(), total_debit)\n
if error[\'error_code\'] == 1:\n
msg = Message(domain=\'ui\', message="Bank account is not sufficient.")\n
raise ValidationFailed, (msg,)\n
......@@ -202,7 +202,6 @@ if debit_required:\n
<string>source</string>
<string>msg</string>
<string>movement_list</string>
<string>context</string>
<string>total_debit</string>
<string>_getiter_</string>
<string>movement</string>
......
14
\ No newline at end of file
20
\ 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