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

I want to perform an arithmetic calculation on a field whenever the tree view gets loaded.Here here is the 

model.py:

class li(models.Model):

    ns_rate = fields.Float(compute='_compute_ns_rate', store=True)

     def _compute_ns_rate(self): 

        for record in self: 

            record.ns_rate = float(math.ceil(float(record.ns_rate)*4)/4)




الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
فبراير 18
3522
1
فبراير 16
3684
1
مارس 15
4344
1
مارس 15
5074
1
نوفمبر 23
2544