跳至内容
菜单
此问题已终结
4 回复
4920 查看

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

形象
丢弃
相关帖文 回复 查看 活动
2
9月 23
9931
1
2月 22
6977
2
7月 19
3006
0
11月 18
2924
2
1月 18
7370