Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3688 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ส.ค. 25
2757
1
ก.ค. 25
1100
1
ส.ค. 25
1151
0
พ.ค. 25
1528
2
เม.ย. 25
3723