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

Hello,

I want to know what is the orm model function to call if my model changed without the UI event ?

I'd like to use @api.onchange('state') to execute a method. But it does not work because @api.onchange only works if the UI change value. What is the function to call if backend/background changed without the UI event ??


Thanks

아바타
취소

Can you give some details like what you want to achieve using a function?

베스트 답변

create() and write() function anyway need to invoke whenever you need to add any updates in the corresponding model. So you can trace any changes through these ORM Functions.

아바타
취소
베스트 답변

@api.constrains('state') should the trick for you.

This is called whenever the state field is written to, whether it's saving from the UI, or from another call.

Cheers,

Jake Robinson 

아바타
취소
관련 게시물 답글 화면 활동
write() vs update() 해결 완료
4
9월 20
41963
0
8월 25
73
1
8월 25
492
2
7월 25
2940
3
7월 25
694