openerp - How do I make a class (that already exist) inherit another class? -


for example class res.partner. want res.partner inherit class a. how do that?

i don't think work:

class custom_res_partner(osv.osv):      _name           = "res.partner"     _inherit        = "a"  custom_res_partner() 

if model present , want inherit model, should done this:

class custom_res_partner(osv.osv):     _name = "res.partner"     _inherit = ['res.partner', 'a'] 

_name part important here, odoo knows model inherits which. in _inherit need specify res.partner, because extending model.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -