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

Hi,

  Am working on odoov11 , i created a custom field x_difference which can calculate the difference between two fields open_meter_reading and close_meter_reading, i tried the following code in the compute field while creating the field

​x_difference = close_meter_reading - open_meter_reading​

but its not working, can anyone say the proper codes to use them to compute the difference?

if possible give the detail structure of the field that which datatype to used,what we have to write in related field, dependencies, and compute...

Thank you

الصورة الرمزية
إهمال

Have you added the code in field definition ? If yes than update the code and make on compute method where add the code which is there in answer section.

أفضل إجابة

Hi,  

try this,

     self.x_difference = self.close_meter_reading - self.open_meter_reading​    

Thanks

Aswini - iWesabe




الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
فبراير 18
8213
0
ديسمبر 23
1282
1
يوليو 22
2261
compute issue تم الحل
1
مايو 21
3688
2
مايو 25
815