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

onchange functions work on virtual records assignment on these records is not written to the database.

Is it possible to save model to database in onchange function?

I am using odoo 8.

EDIT

Let me describe my requirement in detail. I have a simple wizard form(the action target is 'inline') for searching. The form have 2 fields, one is a char field for the searching keyword and the other is a many2many field for the searching result. The onchange function for the keyword field will be triggered for fetching the searching result.

All above are working normally. The problem is when you leaving the page, the browser will popup an alert message something like 'Are you sure you want to leave this page...". This is not make sense for my searching page. For this reason, I think I need to save the wizard model in the onchange function, after this, the alert message wouldn't popup.

Simply, my requirement is to suspress the alert message when the form is not saved. How to make it? Please advice...

아바타
취소

not recommended, why?

작성자

Hi Axel, I have updated my question and describe my requirement in detail. If you have any advice plz update.Thanks!

관련 게시물 답글 화면 활동
2
3월 15
5117
1
7월 19
3152
2
11월 16
5879
1
9월 16
7834
0
3월 25
1262