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

Hi,


i'm trying to call a function in python with following buttons:

<form string="Settings" class="oe_form_configuration">
     <header>
         <button string="Apply" type="object" name="execute" class="oe_highlight"/>
         <button string="Cancel" type="object" name="cancel" class="oe_link"/>
    </header>
     ...
</form>

But, they will never be called. After some time, I saw that is just called the method of update, that is, def write(...).

Can someone help me understand the problem?


Best regards

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

Hi,


I solved this with:

@api.one
아바타
취소
베스트 답변

Put the name first before the string

 <button name="execute" string"Apply" type="object" class="oe_highlight"/>
아바타
취소
관련 게시물 답글 화면 활동
0
2월 17
2877
1
1월 16
6228
4
1월 16
6235
4
7월 20
8360
0
12월 19
3732