I have a function that give me a quantity from a product but it displays 3 decimals and I want to show only two
<t t-esc="orderline.get_quantity_str_with_unit()" />
I tried this:
<t t-esc="orderline.get_quantity_str_with_unit().toFixed(2)"/>
I have a function that give me a quantity from a product but it displays 3 decimals and I want to show only two
<t t-esc="orderline.get_quantity_str_with_unit()" />
I tried this:
<t t-esc="orderline.get_quantity_str_with_unit().toFixed(2)"/>
I am assuming your function returns a string. You were not very clear with what your function returns, but try this:
Number(yourFunction()).toFixed(2)