Skip to content

Commit 904c78d

Browse files
committed
[IMP] developer/javascript_reference: hide_trailing_zeros field option
This commit adds the documentation that was missing for odoo/odoo#208451 task-4626715 closes #15264 Forward-port-of: #15241 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
1 parent 29fbfc6 commit 904c78d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

content/developer/reference/frontend/javascript_reference.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,13 @@ Float (`float`)
625625
626626
<field name="int_value" options="{'format': false}" />
627627
628+
- `hide_trailing_zeros`: hide zeros to the right of the last non-zero digit,
629+
e.g. `1.20` becomes `1.2` (`false` by default).
630+
631+
.. code-block:: xml
632+
633+
<field name="int_value" options="{'hide_trailing_zeros': true}" />
634+
628635
Time (`float_time`)
629636
The goal of this widget is to display properly a float value that represents
630637
a time interval (in hours). So, for example, `0.5` should be formatted as `0:30`,
@@ -787,6 +794,13 @@ Monetary (`monetary`)
787794
788795
<field name="value" widget="monetary" options="{'currency_field': 'currency_id'}" />
789796
797+
- `hide_trailing_zeros`: hide zeros to the right of the last non-zero digit,
798+
e.g. `1.20` becomes `1.2` (`false` by default).
799+
800+
.. code-block:: xml
801+
802+
<field name="int_value" options="{'hide_trailing_zeros': true}" />
803+
790804
Text (`text`)
791805
This is the default field type for fields of type `text`.
792806

0 commit comments

Comments
 (0)