Odoo Help


Object button don't call method in python

Pedro Leite
on 2/8/16, 10:53 AM 1,032 views


i'm trying to call a function in python with following buttons:

<form string="Settings" class="oe_form_configuration">
         <button string="Apply" type="object" name="execute" class="oe_highlight"/>
         <button string="Cancel" type="object" name="cancel" class="oe_link"/>

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

Pedro Leite
On 2/9/16, 1:21 PM


I solved this with:

Samantha Cruz
On 2/8/16, 7:41 PM

Put the name first before the string

 <button name="execute" string"Apply" type="object" class="oe_highlight"/>

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/8/16, 10:53 AM
Seen: 1032 times
Last updated: 2/9/16, 1:22 PM