Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
8161 Widoki

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.        

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Here is the answer for you my friend;

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

Best regards.

Awatar
Odrzuć
Najlepsza odpowiedź

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"/>
Awatar
Odrzuć
Najlepsza odpowiedź

For Odoo 12, here is the syntax.

<span t-field="employee_code" t-options='{"widget": "payment"}' />
Awatar
Odrzuć
Najlepsza odpowiedź

In qweb report we use ,

<span t-field="doc.total_fine_amount"

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
maj 16
2790
1
sie 23
5179
4
lis 24
7204
0
gru 18
3556
9
lut 17
5801