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

I am using Odoo 10 and I cant figure out how to stop a custom float field rounding.

Here is my field box = fields.Float("Yards Per Box")

In Odoo if I put 1.196 into the field it auto rounds to 1.20 how can I stop this on a custom Float field?

Avatar
Abbandona
Risposta migliore

Use this one

box = fields.Float("Yards Per Box",digits=(12,3))

Hope this will helps you and others.

Avatar
Abbandona
Autore Risposta migliore

Thanks what does the (12,3)) stand for. If I have a float field that is 2.17 how do I get it to go to next number 3?

Avatar
Abbandona
Risposta migliore

thanks for the reply

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
set 23
9877
1
feb 22
6901
2
lug 19
2979
0
nov 18
2893
2
gen 18
7335