تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4 الردود
4919 أدوات العرض

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
سبتمبر 23
9931
1
فبراير 22
6977
2
يوليو 19
3006
0
نوفمبر 18
2922
2
يناير 18
7369