changeset a77ac8e8eba8 in modules/production_outsourcing:default
details:
https://hg.tryton.org/modules/production_outsourcing?cmd=changeset&node=a77ac8e8eba8
description:
Add method to format warning name with records
issue10507
review346471002
diffstat:
production.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r 8969734e6bc7 -r a77ac8e8eba8 production.py
--- a/production.py Mon May 03 16:09:29 2021 +0200
+++ b/production.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 itertools import groupby
from trytond.i18n import gettext
@@ -234,8 +233,7 @@
names = ', '.join(p.rec_name for p in productions[:5])
if len(pendings) > 5:
names += '...'
- warning_name = '%s.pending_purchase.done' % hashlib.md5(
- str(pendings).encode('utf-8')).hexdigest()
+ warning_name = Warning.format('pending_purchase.done', pendings)
if Warning.check(warning_name):
raise PurchaseWarning(
warning_name,