Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3213 มุมมอง

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?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

try this,

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

Thanks !!!  


Aswini @ iWesabe

อวตาร
ละทิ้ง

itharappa

ผู้เขียน

Am I able to change the dot for a coma?

please check this,

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

คำตอบที่ดีที่สุด
On reports you can set:
​<t t-esc="'%.2f' % (o.amount)"/>

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


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Merge Same Item in Sale Order Line แก้ไขแล้ว
2
ม.ค. 24
5914
0
มิ.ย. 23
2431
1
ธ.ค. 22
3812
0
เม.ย. 22
2926
1
เม.ย. 19
6603