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

I have a computed field that depends on a relation. Somewhere in my code I update this relation by accessing directly the database (self.env.cr.execute). My question is how can I force the recomputation afterwards ?

In v7 I used the _store_set_values function which worked like a charm. But now this method seems broken. Any other way of doing this in v8 ?

아바타
취소

You can use the on_change function which will call automatically the function you need at the moment you click on a specific field. I can give you an example if you need.

작성자

I'm afraid the on_change function is not called after a database query. My question is not related to views and clicks.

작성자 베스트 답변

The solution is trivial : just call the compute method of the fields needed to be refreshed. Sorry for this one.

아바타
취소
관련 게시물 답글 화면 활동
0
8월 15
3520
7
9월 20
7425
2
6월 18
16645
1
11월 17
4037
0
11월 16
4028