From 854a61db4e07754683cca1ce1a6765669bcdaef3 Mon Sep 17 00:00:00 2001 From: Arnaud Sibille Date: Fri, 30 Jan 2026 12:00:41 +0000 Subject: [PATCH] [IMP] javascript reference: add min_display_digits option https://github.com/odoo/enterprise/pull/104728 added a `min_display_digits` option on float fields. This commit adds it also in the documentation. X-original-commit: 97280663fdd5909aa914c3f6ae84a96a34121a84 --- .../frontend/javascript_reference.rst | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/content/developer/reference/frontend/javascript_reference.rst b/content/developer/reference/frontend/javascript_reference.rst index a15897d212..5371093a57 100644 --- a/content/developer/reference/frontend/javascript_reference.rst +++ b/content/developer/reference/frontend/javascript_reference.rst @@ -607,14 +607,14 @@ Float (`float`) .. code-block:: xml - + - `step`: set the step to the value up and down when the user click on buttons (only for input of type number, `1` by default) .. code-block:: xml - + - `format`: should the number be formatted. (`true` by default) @@ -623,14 +623,24 @@ Float (`float`) .. code-block:: xml - + + + - `min_display_digits`: The minimum number of decimal digits to display. + + For example, if set to 3 and no decimal precision is provided: + `1.2` becomes `"1.200"`, `1.123` becomes `"1.123"` and `1.1234` becomes `"1.1234"`. + + .. code-block:: xml + + + - `hide_trailing_zeros`: hide zeros to the right of the last non-zero digit, e.g. `1.20` becomes `1.2` (`false` by default). .. code-block:: xml - + Time (`float_time`) The goal of this widget is to display properly a float value that represents