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

I'll like to know if there's a way to trigger a method when the Save action_button is clicked?

I can't use it so that I overwrite the write method because that throws a RuntimeError: maximum recursion depth exceeded in cmp and it only triggers it when something is changed! 

I tried to do all that the method does with depends like it was suggested in my other post about the RuntimeError, but that doesn't work. Some record IDs are  object.model NewId! 

This method that I want to trigger is just to refresh the values from relation models that can't be accessed on edit because  object.model NewId.

I can trigger the method from a button from the view but that's not user friendly, because he has to do two clicks instead of one.

So is there a way to do this without changing any odoo core methods? If it is possible an example would be nice.  

아바타
취소

I think you can do it with overriding the create or write method. Just update the question with the code you are working on

작성자

No I can't... https://www.odoo.com/forum/help-1/question/runtimeerror-maximum-recursion-depth-exceeded-in-cmp-problem-133054

The code is more than 1000 lines so I can't post it. It's like a excel table where you do calculations.

관련 게시물 답글 화면 활동
0
9월 17
3983
2
7월 25
4631
2
12월 24
7774
2
11월 24
28544
2
5월 24
7483