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

I  define function 'write' as below in .py file:

@api.multi
def write(self, cr, uid, ids, vals, context=None):
    raise Warning('his ds sf')
    res = super(Checks, self).write(cr, uid, ids, vals, context=context) #res stores the result of the write function
    return res

I hope when click 'edit' button, a raise box would pop out; but in fact nothing happen when I  click the 'edit' button.

shall I  get some advice for this?


아바타
취소

write is triggered after clicking on SAVE.

작성자

so which function is triggered after clicking on EDIT?

베스트 답변

The write method triggered only if you edit an existing record after you click on Save button not Edit button.

아바타
취소
작성자

what shall I do if I want to run some code when I click the "edit " button.

Edit is a Framework button defined in web app defined in base.xml file in \web\static\src\xml and there is no python method link to it and it's controlled by javascript and I don't have more info about.

작성자

thanks a lot!

관련 게시물 답글 화면 활동
1
8월 19
5991
1
3월 15
5238
1
3월 15
4416
0
12월 23
1251
3
2월 24
4764