تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
3246 أدوات العرض

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


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يناير 24
5949
0
يونيو 23
2465
1
ديسمبر 22
3845
0
أبريل 22
2963
1
أبريل 19
6629