Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
3242 Vues

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?

Avatar
Ignorer
Meilleure réponse

Hi,

try this,

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

Thanks !!!  


Aswini @ iWesabe

Avatar
Ignorer

itharappa

Auteur

Am I able to change the dot for a coma?

please check this,

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

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

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


Avatar
Ignorer
Publications associées Réponses Vues Activité
2
janv. 24
5946
0
juin 23
2461
1
déc. 22
3842
0
avr. 22
2959
1
avr. 19
6627