İçereği Atla
Menü
Bu soru işaretlendi
4 Cevaplar
4876 Görünümler

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
Vazgeç
En İyi Yanıt

Use this one

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

Hope this will helps you and others.

Avatar
Vazgeç
Üretici En İyi Yanıt

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
Vazgeç
En İyi Yanıt

thanks for the reply

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Eyl 23
9873
1
Şub 22
6897
2
Tem 19
2979
0
Kas 18
2881
2
Oca 18
7334