Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
4885 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

Use this one

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

Hope this will helps you and others.

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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?

Awatar
Odrzuć
Najlepsza odpowiedź

thanks for the reply

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
wrz 23
9882
1
lut 22
6905
2
lip 19
2980
0
lis 18
2901
2
sty 18
7336