From e1412d79b4e92b9f17befda622635b5867bf30ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 8 Oct 2015 19:41:04 +0200 Subject: [PATCH] Make digits with None behaves like None digits issue5019 review23501002 --- tryton/gui/window/view_form/model/field.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py index e845344292..3c64cabaf1 100644 --- a/tryton/gui/window/view_form/model/field.py +++ b/tryton/gui/window/view_form/model/field.py @@ -300,7 +300,7 @@ class FloatField(Field): def digits(self, record, factor=1): digits = record.expr_eval(self.attrs.get('digits')) - if not digits: + if not digits or any(d is None for d in digits): return shift = int(round(math.log(abs(factor), 10))) return (digits[0] + shift, digits[1] - shift)