details: https://code.tryton.org/tryton/commit/2d241c37d3c4
branch: 7.8
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 1a961eae4f22 -r 2d241c37d3c4 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