Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
6046 Weergaven

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
Annuleer
Auteur Beste antwoord

Hi,


I solved this with:

@api.one
Avatar
Annuleer
Beste antwoord

Put the name first before the string

 <button name="execute" string"Apply" type="object" class="oe_highlight"/>
Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
feb. 17
2874
1
jan. 16
6227
4
jan. 16
6232
4
jul. 20
8357
0
dec. 19
3730