콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4040 화면

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
2월 18
8379
0
12월 23
1421
1
7월 22
2416
compute issue 해결 완료
1
5월 21
3842
2
5월 25
1009