Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
4906 Zobrazení

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
Zrušit
Nejlepší odpověď

Use this one

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

Hope this will helps you and others.

Avatar
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

thanks for the reply

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
zář 23
9925
1
úno 22
6959
2
čvc 19
3005
0
lis 18
2912
2
led 18
7360