跳至內容
選單
此問題已被標幟
2 回覆
6059 瀏覽次數

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
2878
1
1月 16
6231
4
1月 16
6237
4
7月 20
8361
0
12月 19
3735