Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
4 Vastaukset
4951 Näkymät

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
Hylkää
Paras vastaus

Use this one

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

Hope this will helps you and others.

Avatar
Hylkää
Tekijä Paras vastaus

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
Hylkää
Paras vastaus

thanks for the reply

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
syysk. 23
9954
1
helmik. 22
6995
2
heinäk. 19
3030
0
marrask. 18
2948
2
tammik. 18
7404