Home Ask Login Register

Developers Planet

Your answer is one click away!

pmcleite February 2016

Object button don't call method in python

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?

EDIT: Actually, I remove all logic from methods:

def execute(self, cr, uid, ids, context=None):

def cancel(self, cr, uid, ids, context=None):

Best regards


Alessandro Ruffolo February 2016

Instead of using old v7 API, try v8:

def execute(self):

def cancel(self):

(or multi instead of one. Here's the difference)

Post Status

Asked in February 2016
Viewed 3,828 times
Voted 4
Answered 1 times


Leave an answer

Quote of the day: live life