mirror of
https://github.com/odoo/documentation.git
synced 2025-12-12 07:29:27 +07:00
[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#15263 Forward-port-of: odoo/documentation#15241 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
@@ -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`,
|
||||
@@ -787,6 +794,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`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user