Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
4 Răspunsuri
4871 Vizualizări

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?

Imagine profil
Abandonează
Cel mai bun răspuns

Use this one

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

Hope this will helps you and others.

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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?

Imagine profil
Abandonează
Cel mai bun răspuns

thanks for the reply

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
sept. 23
9860
1
feb. 22
6886
2
iul. 19
2976
0
nov. 18
2875
2
ian. 18
7334