Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
5942 Visualizzazioni

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
Abbandona
Autore Risposta migliore

Hi,


I solved this with:

@api.one
Avatar
Abbandona
Risposta migliore

Put the name first before the string

 <button name="execute" string"Apply" type="object" class="oe_highlight"/>
Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
feb 17
2765
1
gen 16
6108
4
gen 16
6106
4
lug 20
8210
0
dic 19
3629