How to override a button function odoo


def action_button_confirm(self, cr, uid, ids, context=None):
    res_partner_obj = self.pool.get('res.partner')
    current_record_id = self.browse(cr, uid, ids, context=context)
    if current_record_id.partner_id:
        res_partner_obj.write(cr, uid, current_record_id.partner_id.id, {'customer': True})
    return super(sale_order, self).action_button_confirm(cr, uid, ids, context=context)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s