Skip to Content
Menu
This question has been flagged
2 Replies
4996 Views

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

Avatar
Discard
Author Best Answer

Hi,


I solved this with:

@api.one
Avatar
Discard
Best Answer

Put the name first before the string

 <button name="execute" string"Apply" type="object" class="oe_highlight"/>
Avatar
Discard
Related Posts Replies Views Activity
0
Feb 17
1797
1
Jan 16
5236
4
Jan 16
5202
4
Jul 20
7227
0
Dec 19
2916