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

Hey, so we have been modifying the base odoo modules to suit our companies needs.

We have reached a standstill in that we cant actually find the python code for the contacts module since we want to modify the create method but not have to override it using a custom module.

Can anyone point me to where this would be found, ive searched all res.partner.py files and all turn up to have nothing usefull in. Thanks


อวตาร
ละทิ้ง

Modifying the base Odoo modules - this is a bad idea unless you want to fork the software. You won't be able to update your Odoo Code without losing your changes. Any changes should be done in your own modules overriding base Odoo data structures and methods as well as the Views that present these to the User.

Override Odoo Functions: https://goo.gl/4BkizH

คำตอบที่ดีที่สุด

Hi,

  • If you check the files you wont see the create method of contacts in its file, the create , delete, write functions will be handle by odoo orm. If you need to modify anything you can just inherit/super the create method, see this example: How To Override Create Function in Odoo

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 23
3881
1
มิ.ย. 22
5712
3
ก.ย. 21
5157
0
มี.ค. 15
4129
4
ก.ค. 25
464