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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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?
Use this one
box = fields.Float("Yards Per Box",digits=(12,3))
Hope this will helps you and others.
For more information/detail: http://learnopenerp.blogspot.com/2018/09/how-to-stop-auto-rounding-of-float-fields-in-odoo.html
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?
thanks for the reply
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
2
set. 23
|
9538 | ||
|
1
fev. 22
|
6450 | ||
Error group_sale_order_template (v12)
Resolvido
|
|
2
jul. 19
|
2662 | |
|
0
nov. 18
|
2671 | ||
|
2
jan. 18
|
7188 |