Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
8182 Visualizzazioni

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.        

Avatar
Abbandona
Autore Risposta migliore

Here is the answer for you my friend;

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

Best regards.

Avatar
Abbandona
Risposta migliore

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"/>
Avatar
Abbandona
Risposta migliore

For Odoo 12, here is the syntax.

<span t-field="employee_code" t-options='{"widget": "payment"}' />
Avatar
Abbandona
Risposta migliore

In qweb report we use ,

<span t-field="doc.total_fine_amount"

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

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
mag 16
2812
1
ago 23
5193
4
nov 24
7216
0
dic 18
3562
9
feb 17
5809