跳至內容
選單
此問題已被標幟
4 回覆
8155 瀏覽次數

Hello everybody!!!

My friends, i am printing some reports.

But, the problem is that i have some fields type float. So, when i print my reports i get comma.

I want to eliminate the comma without multiplying the number.

So, i there any way except multiplying the number or changing the field from integer to char.

Need an answer firends.

Thanks a lot in advance.

Best Regards.        

頭像
捨棄
作者 最佳答案

Here is the answer for you my friend;

      <span t-esc="'%.0f'%company.cnss"/>

Best regards.

頭像
捨棄
最佳答案

use in case if you are trying in form or tree 

widget="payment"

example

in py

class sample(models.Model):   

         _name="module.sample"

         integer_field = fields.Integer()

in xml

<field name="integer_field" widget="payment"/>
頭像
捨棄
最佳答案

For Odoo 12, here is the syntax.

<span t-field="employee_code" t-options='{"widget": "payment"}' />
頭像
捨棄
最佳答案

In qweb report we use ,

<span t-field="doc.total_fine_amount"

              t-field-options='{"widget": "payment"/>

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
5月 16
2787
1
8月 23
5170
4
11月 24
7198
0
12月 18
3552
9
2月 17
5798