Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
6015 Vues

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
Ignorer
Auteur Meilleure réponse

Hi,


I solved this with:

@api.one
Avatar
Ignorer
Meilleure réponse

Put the name first before the string

 <button name="execute" string"Apply" type="object" class="oe_highlight"/>
Avatar
Ignorer
Publications associées Réponses Vues Activité
0
févr. 17
2845
1
janv. 16
6193
4
janv. 16
6199
4
juil. 20
8316
0
déc. 19
3702