Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3680 Prikazi

Hello All,

How we can override framework method in odoo. give example of any method.

 

Thanks in advance.

Avatar
Opusti
Best Answer

Hi Prince,

Please have a look on the below ex. That is for override write method of the BaseModel.

from openerp.osv import orm

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

 ..... Your code ...

    return True

orm.BaseModel.write = custom_write

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
avg. 25
2752
1
jul. 25
1097
1
avg. 25
1151
0
maj 25
1525
2
apr. 25
3717