跳至内容
菜单
此问题已终结
2 回复
6055 查看

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