コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4 返信
4927 ビュー

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
9941
1
2月 22
6983
2
7月 19
3014
0
11月 18
2935
2
1月 18
7380