Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
5885 Vistas

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
Descartar
Autor Mejor respuesta

Hi,


I solved this with:

@api.one
Avatar
Descartar
Mejor respuesta

Put the name first before the string

 <button name="execute" string"Apply" type="object" class="oe_highlight"/>
Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
feb 17
2681
1
ene 16
6028
4
ene 16
6036
4
jul 20
8137
0
dic 19
3585