跳至內容
選單
此問題已被標幟
1 回覆
3685 瀏覽次數

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
8月 25
2755
1
7月 25
1098
1
8月 25
1151
0
5月 25
1528
2
4月 25
3723