Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
4 Ответы
4886 Представления

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?

Аватар
Отменить
Лучший ответ

Use this one

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

Hope this will helps you and others.

Аватар
Отменить
Автор Лучший ответ

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?

Аватар
Отменить
Лучший ответ

thanks for the reply

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
сент. 23
9883
1
февр. 22
6907
2
июл. 19
2980
0
нояб. 18
2903
2
янв. 18
7336