changeset 6f99816dc786 in modules/product:5.4
details: https://hg.tryton.org/modules/product?cmd=changeset;node=6f99816dc786
description:
Add missing enumerate when looping on non modifiable field
It is missing since changeset 8c885973a93f.
issue8984
review274691002
(grafted from 02e8b1c7accfc5bd68ce5dc49bcdb2d62c5a80b4)
diffstat:
uom.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 25948eae0ae2 -r 6f99816dc786 uom.py
--- a/uom.py Mon Nov 04 13:01:24 2019 +0100
+++ b/uom.py Mon Jan 20 11:12:47 2020 +0100
@@ -166,7 +166,7 @@
super(Uom, cls).write(*args)
for uom in all_uoms:
- for i, field in ['factor', 'rate', 'category']:
+ for i, field in enumerate(['factor', 'rate', 'category']):
if getattr(uom, field) != old_uom[uom.id][i]:
raise AccessError(
gettext('product.msg_uom_modify_%s' % field,