Skip to content Skip to sidebar Skip to footer

Openerp : Multiple Module Overriding Onchange Function

I need to override onchange_partner_id function present in sale.order but I'm working on a system that already have a module overriding this function. I tried to write my own oncha

Solution 1:

Yes you can override this method, for that you need to define new class in which inherit sale.order and define your method.

Your method will be called definitely.

classsale_order(osv.osv):
    _inherit = 'sale.order'defonchange_partner_id(self, cr, uid, ids, part, context=None):
        res = super(sale_order, self).onchange_partner_id(cr, uid, ids, part,context=context)
        // doing some stuff and adding it to res['value']['myfield']
        return res

Post a Comment for "Openerp : Multiple Module Overriding Onchange Function"