changeset 602ac248b0ed in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset&node=602ac248b0ed
description:
Add method to format warning name with records
issue10507
review346471002
diffstat:
move.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r 5c8007be3d46 -r 602ac248b0ed move.py
--- a/move.py Fri Jun 11 00:13:11 2021 +0200
+++ b/move.py Thu Jun 17 09:25:40 2021 +0200
@@ -1,7 +1,6 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from decimal import Decimal
-import hashlib
from itertools import groupby, combinations, chain, islice
from operator import itemgetter
from collections import defaultdict
@@ -1922,8 +1921,7 @@
islice(moves_w_delegation.keys(), None, 5))
if len(moves_w_delegation) > 5:
names += '...'
- key = '%s.cancel_delegated' % hashlib.md5(
- str(list(moves_w_delegation)).encode('utf8')).hexdigest()
+ key = Warning.format('cancel_delegated', moves_w_delegation)
if Warning.check(key):
raise CancelDelegatedWarning(
key, gettext(