Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
4 Besvarelser
5004 Visninger

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
Kassér
Bedste svar

Use this one

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

Hope this will helps you and others.

Avatar
Kassér
Forfatter Bedste svar

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
Kassér
Bedste svar

thanks for the reply

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
2
sep. 23
9988
1
feb. 22
7077
2
jul. 19
3066
0
nov. 18
3001
2
jan. 18
7471