Skip to Content
Menu
This question has been flagged
4 Replies
5167 Rodiniai

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?

Portretas
Atmesti
Best Answer

Use this one

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

Hope this will helps you and others.

Portretas
Atmesti
Autorius 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?

Portretas
Atmesti
Best Answer

thanks for the reply

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
rugs. 23
10207
1
vas. 22
7381
2
liep. 19
3198
0
lapkr. 18
3113
2
saus. 18
7615