changeset f7e204d9b4db in modules/account_statement:default
details:
https://hg.tryton.org/modules/account_statement?cmd=changeset&node=f7e204d9b4db
description:
Add method to format warning name with records
issue10507
review346471002
diffstat:
statement.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (23 lines):
diff -r 9d5a1775ede2 -r f7e204d9b4db statement.py
--- a/statement.py Mon May 03 15:51:50 2021 +0200
+++ b/statement.py Thu Jun 17 09:25:40 2021 +0200
@@ -1,6 +1,5 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
-import hashlib
from decimal import Decimal
from collections import namedtuple, defaultdict
from itertools import groupby
@@ -504,9 +503,9 @@
if l.invoice and l.invoice.state in {'cancelled', 'paid'})
if paid_cancelled_invoice_lines:
- warning_key = ('%s.statement_paid_cancelled_invoice_lines' %
- hashlib.md5(str(paid_cancelled_invoice_lines).encode(
- 'utf-8')).hexdigest())
+ warning_key = Warning.format(
+ 'statement_paid_cancelled_invoice_lines',
+ paid_cancelled_invoice_lines)
if Warning.check(warning_key):
raise StatementValidateWarning(warning_key,
gettext('account_statement'