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

I declared a new float:

some_weight = fields.Float('Some Weight', digits_compute=dp.get_precision('Stock Weight'), default=0.0,

                           help="The some weight in g.")

Import the dp:

import openerp.addons.decimal_precision as dp


In Odoo Decimal Accuracy menu I have change the digits from 2 -> 4. All standard Odoo Foat Field that use dp of 'Stock Weight' are showing 4 digits of decimal. But not my new declared fields. How to make my new declare fields follow the dp of 'Stock Weight' without forcing the digits value in xml. Thank you.

الصورة الرمزية
إهمال
الكاتب

Anybody know the answer?

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 15
3936
0
نوفمبر 24
1079
1
يوليو 21
11756
1
يوليو 21
3258
0
يناير 21
2897