Commit 9d2f45b4 authored by Jérome Perrin's avatar Jérome Perrin

include the name of the section in the message


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37258 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a0a8115b
......@@ -37,9 +37,9 @@ class AccountingTransactionBalance(Constraint):
'message_transaction_not_balanced_for_destination' ]
message_transaction_not_balanced_for_source = translateString(
'Transaction is not balanced')
'Transaction is not balanced for ${section_title}')
message_transaction_not_balanced_for_destination = translateString(
'Transaction is not balanced')
'Transaction is not balanced for ${section_title}')
def checkConsistency(self, obj, fixit=0):
"""Implement here the consistency checker
......@@ -67,7 +67,8 @@ class AccountingTransactionBalance(Constraint):
precision = section_currency.getQuantityPrecision()
if round(total, precision) != 0:
error_list.append(self._generateError(obj, self._getMessage(
'message_transaction_not_balanced_for_source')))
'message_transaction_not_balanced_for_source'),
mapping=dict(section_title=section.getTranslatedTitle())))
break
for section, total in destination_sum.items():
......@@ -79,7 +80,8 @@ class AccountingTransactionBalance(Constraint):
precision = section_currency.getQuantityPrecision()
if round(total, precision) != 0:
error_list.append(self._generateError(obj, self._getMessage(
'message_transaction_not_balanced_for_source')))
'message_transaction_not_balanced_for_source'),
mapping=dict(section_title=section.getTranslatedTitle())))
break
return error_list
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