Skip to content Skip to sidebar Skip to footer

How To Write "write" Function Without Effecting Inherited Class In Odoo 8?

The situation is as follows: This is my .py file class mom_meeting(osv.osv): _name = 'mom.meeting' _rec_name = 'meet_ref' _inherit = ['mail.thread'] and I had added t

Solution 1:

To eliminate need of calling super method, you can use like this:-

instead of this ->

super(mom_meeting, self).write(cr, uid, [rec.id], vals, context=None)

you can give-> osv.osv.write(cr, uid, [rec.id], vals, context=None)

This will call directly write function of ORM...

Hope this helps....


Post a Comment for "How To Write "write" Function Without Effecting Inherited Class In Odoo 8?"