Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3812 Tampilan

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

Avatar
Buang

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.

Jawaban Terbai

Hi,  

try this,

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

Thanks

Aswini - iWesabe




Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Feb 18
8156
0
Des 23
1223
1
Jul 22
2197
compute issue Diselesaikan
1
Mei 21
3613
2
Mei 25
783