Skip to content

Commit a11f576

Browse files
committed
[IMP] developer/javascript_reference: hide_trailing_zeros statinfo option
This commit adds the documentation for new option `hide_trailing_zeros` supported in statinfo widget. Community PR: odoo/odoo#235931 task-5238438 closes #15366 Related: odoo/odoo#235931 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
1 parent 7a5e3b6 commit a11f576

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

content/developer/reference/frontend/javascript_reference.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,13 @@ Stat Info (`statinfo`)
10361036
/>
10371037
</button>
10381038
1039+
- `hide_trailing_zeros`: hide zeros to the right of the last non-zero digit,
1040+
e.g. `1.20` becomes `1.2` (`false` by default).
1041+
1042+
.. code-block:: xml
1043+
1044+
<field name="int_value" widget="statinfo" options="{'hide_trailing_zeros': true}" />
1045+
10391046
Percent Pie (`percentpie`)
10401047
This widget is meant to represent statistical information in a `stat button`.
10411048
This is similar to a statinfo widget, but the information is represented in

0 commit comments

Comments
 (0)