Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3725 Vistas

Hello All,

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

 

Thanks in advance.

Avatar
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
ago 25
2831
1
jul 25
1150
1
ago 25
1152
0
may 25
1568
2
abr 25
3765