Community mailing list archives

[8.0] Qweb question for float/integer widget

PT. Falinwa Indonesia Jaya, Hans
- 04/17/2015 01:43:25

Hi Odoo Community,


So I am in the middle to migrate the report from RML to Qweb,


I found this code in RML [[ formatLang(o.product_qty, digits=0) ]]

So in this code, we display the qty without digit precision.


How I migrate this code to qweb?


As my code in qweb I did this:


<span t-field=”o.product_qty” t-field-options=’{“digits”:0}’ />


And its not worked, it just display the qty with digit precision.


If I did this:

<span t-raw=”o.product_qty” />


<span t-raw=”o.product_qty”  t-field-options=’{“widget”:’integer’}’ />


The display will be: 1.0

What I want is just :1

Without digit precision.


How can I do that? Is there any people that know it?




Thank You.


Best Regards,

Hans Yonathan

Odoo Support


Expert in Finance, Information System & Business Intelligence

Odoo Silver Partner


Tel. 13670137019 (China - Shenzhen)