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

I create a wizard that it's called when I select 2 or more elements in the tree view. 
The field that is in the wizard has an on_change that return a domain if the conditions are true, but when one of them is false I want to show an error message. 
And I used 

raise osv.except_osv(_('Error'), _('You have selected 1 or more tickets of different partners.'))
The problem is when I display this error and the user click in the button of the message error to close it, I want the wizard close too.
아바타
취소
베스트 답변

Hi Celia, when a error message is showed with popup, the python execution is stopped (It has been thrown an exception), and the control is managed by javascript.

You should change the javascript functionality for your purpose.

아바타
취소
작성자 베스트 답변

 Juan Vicente I see that answer in others answers, but if I close the wizard I can't display an error message. :(

Isaac, do you know where and how I have to do the change necessary in JavaScript code? 

Thanks for your answer! And ideas! ^^   

아바타
취소
베스트 답변

take a look at this,

return {'type': 'ir.actions.act_window_close'}

Kind Regards.

아바타
취소
관련 게시물 답글 화면 활동
1
2월 18
4495
5
4월 19
9007
1
5월 16
8397
1
10월 24
9054
2
5월 25
10345