Skip to Content
Menu
This question has been flagged
2 Replies
6136 Views

Hello Everyone

I have some calculated value and I want to display it on report.

For example

<t t-set="price_unit" t-value="2000000"/>
<span t-esc="price_unit"/>

And it should be 2.000.000

The only thing I could use in the previous versions was formatLang, but that is a webkit method and Odoo 12 doesn't have that anymore. Is there any other way to format the number and it's thousands separator in qweb?

Help me, pls
Thanks


Avatar
Discard
Best Answer

Hello

try with below options.

<span t-esc="price_unit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>

you have to pass the currency so it will get the separator automatically.

I hope this will helps you.

Avatar
Discard
Best Answer

and what if we do not want a currency symbol with it. Is there any solution for that thanks in advance

Avatar
Discard