Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
4 Antwoorden
4888 Weergaven

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
Annuleer
Beste antwoord

Use this one

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

Hope this will helps you and others.

Avatar
Annuleer
Auteur Beste antwoord

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
Annuleer
Beste antwoord

thanks for the reply

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
sep. 23
9884
1
feb. 22
6908
2
jul. 19
2980
0
nov. 18
2903
2
jan. 18
7336