Skip to Content
मेन्यू
This question has been flagged
4 Replies
4899 Views

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
Discard
Best Answer

Use this one

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

Hope this will helps you and others.

Avatar
Discard
Author Best Answer

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
Discard
Best Answer

thanks for the reply

Avatar
Discard
Related Posts Replies Views Activity
2
सित॰ 23
9897
1
फ़र॰ 22
6929
2
जुल॰ 19
2981
0
नव॰ 18
2912
2
जन॰ 18
7351