Skip to Content
Menu
This question has been flagged
2 Replies
3211 Rodiniai

I have the decimal precision in Price to five 0. The problem is that in Sales Orders is so ugly to see 5 zero because we only use max. 2. Is there any widget or code to put in the reports to say that in the uni price and total price only two 0  as decimal?

Portretas
Atmesti
Best Answer

Hi,

try this,

  <span t-esc="'%.2f'% field_name"/>

Thanks !!!  


Aswini @ iWesabe

Portretas
Atmesti

itharappa

Autorius

Am I able to change the dot for a coma?

please check this,

<span t-esc="str('%.2f'%obj.field_name).replace('.', ',')"/>

Best Answer
On reports you can set:
​<t t-esc="'%.2f' % (o.amount)"/>

for example, if o is the object and amount the field


Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
saus. 24
5914
0
birž. 23
2430
1
gruod. 22
3811
0
bal. 22
2922
1
bal. 19
6597