تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
3686 أدوات العرض

Hello All,

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

 

Thanks in advance.

الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أغسطس 25
2755
1
يوليو 25
1098
1
أغسطس 25
1151
0
مايو 25
1528
2
أبريل 25
3723