[IMP] developer/javascript_reference: hide_trailing_zeros field option

This commit adds the documentation that was missing for https://github.com/odoo/odoo/pull/208451

task-4626715

closes odoo/documentation#15241

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Julien Carion (juca)
2025-11-13 15:19:00 +00:00
parent 0c9c087763
commit 6cfaf2efe1

View File

@@ -625,6 +625,13 @@ Float (`float`)
<field name="int_value" options="{'format': false}" />
- `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
<field name="int_value" options="{'hide_trailing_zeros': true}" />
Time (`float_time`)
The goal of this widget is to display properly a float value that represents
a time interval (in hours). So, for example, `0.5` should be formatted as `0:30`,
@@ -767,6 +774,13 @@ Monetary (`monetary`)
<field name="value" widget="monetary" options="{'currency_field': 'currency_id'}" />
- `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
<field name="int_value" options="{'hide_trailing_zeros': true}" />
Text (`text`)
This is the default field type for fields of type `text`.