Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
4915 มุมมอง

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
9927
1
ก.พ. 22
6969
Error group_sale_order_template (v12) แก้ไขแล้ว
2
ก.ค. 19
3005
0
พ.ย. 18
2917
2
ม.ค. 18
7364