Se rendre au contenu
Menu
Cette question a été signalée
4 Réponses
4900 Vues

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
Ignorer
Meilleure réponse

Use this one

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

Hope this will helps you and others.

Avatar
Ignorer
Auteur Meilleure réponse

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
Ignorer
Meilleure réponse

thanks for the reply

Avatar
Ignorer
Publications associées Réponses Vues Activité
2
sept. 23
9900
1
févr. 22
6931
2
juil. 19
2981
0
nov. 18
2912
2
janv. 18
7356