Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
3209 Vistas

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
Descartar
Mejor respuesta

Hi,

try this,

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

Thanks !!!  


Aswini @ iWesabe

Avatar
Descartar

itharappa

Autor

Am I able to change the dot for a coma?

please check this,

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

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

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


Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
ene 24
5913
0
jun 23
2430
1
dic 22
3809
0
abr 22
2919
1
abr 19
6597