details: https://code.tryton.org/tryton/commit/d8564a964457
branch: 7.6
user: Maxime Richez <[email protected]>
date: Fri Feb 06 15:32:39 2026 +0100
description:
Do not round None value when entering non decimal text in number entry
Closes #14559
(grafted from a7ddaf35116323700ba67e13e6218c3d75dc60ce)
diffstat:
tryton/tryton/common/number_entry.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r d8f89bd0016e -r d8564a964457 tryton/tryton/common/number_entry.py
--- a/tryton/tryton/common/number_entry.py Fri Jan 23 16:05:16 2026 +0100
+++ b/tryton/tryton/common/number_entry.py Fri Feb 06 15:32:39 2026 +0100
@@ -71,7 +71,7 @@
if int_size is not None and value:
if math.ceil(math.log10(abs(value))) > int_size:
return position
- if dec_size is not None:
+ if dec_size is not None and value:
if (round(value, dec_size) != value
or value.as_tuple().exponent < -dec_size):
return position