From 6daccef0922aec3fbdec3930c920bddf77b78c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Thu, 9 Oct 2025 12:36:54 +0200 Subject: [PATCH] Clarify the documentation about digits --- trytond/doc/ref/fields.rst | 4 ++-- trytond/trytond/model/fields/float.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/trytond/doc/ref/fields.rst b/trytond/doc/ref/fields.rst index e51d3fb1e4..9bb8318950 100644 --- a/trytond/doc/ref/fields.rst +++ b/trytond/doc/ref/fields.rst @@ -424,9 +424,9 @@ Float A tuple of two :py:class:`integers `. - The first integer defines the total of numbers in the integer part. + The first integer defines the number of figures in the integer part. - The second integer defines the total of numbers in the decimal part. + The second integer defines the number of figures in the decimal part. Integers can be replaced by a :class:`~trytond.pyson.PYSON` statement. If digits is ``None`` or any values of the tuple is ``None``, no validation diff --git a/trytond/trytond/model/fields/float.py b/trytond/trytond/model/fields/float.py index 06a2bd68a1..a806b4a23a 100644 --- a/trytond/trytond/model/fields/float.py +++ b/trytond/trytond/model/fields/float.py @@ -36,8 +36,8 @@ class Float(Field): on_change=None, on_change_with=None, depends=None, context=None, loading='eager'): ''' - :param digits: a list of two integers defining the total - of digits and the number of decimals of the float. + :param digits: a tuple of two integers defining the number of figures + of the integer and decimal part. ''' super().__init__(string=string, help=help, required=required, readonly=readonly, domain=domain, states=states,