技术咨询:Odoo-10版本中res.partner的具体位置在哪里?
Hey there! Let's break down where you can find res.partner in Odoo 10, both in the codebase and the user interface:
1. Codebase Location (File System Paths)
In Odoo 10's source code, the res.partner model and its related files live in the base module (the core module that powers Odoo's foundational features):
- Core model definition:
odoo/addons/base/res/res_partner.py
This is where the model's fields, methods, and core business logic are defined. - UI view configurations:
odoo/addons/base/res/res_partner_views.xml
You'll find all the form, list, search, and kanban views forres.partnerhere. - Default data records:
odoo/addons/base/res/res_partner_data.xml
This file includes initial default data like country records, default company info, and other base partner entries.
2. Backend UI Location
If you're looking to access res.partner records through the Odoo 10 web interface:
- Direct entry: Go to the Contacts menu (labeled "联系人" in Chinese interfaces). Every record you see here is an instance of
res.partner. - Indirect access via related modules: Many other modules tie into
res.partner. For example:- In the Sales module, the "Customers" menu pulls
res.partnerrecords marked as customers (via thecustomerboolean field). - In the Purchases module, "Suppliers" are
res.partnerrecords marked as suppliers (via thesupplierboolean field). You can navigate to full partner profiles from these related menus too.
- In the Sales module, the "Customers" menu pulls
A quick tip: If you're building a custom module and want to extend res.partner, you don't need to modify the base module files—just inherit the model in your own module's code!
内容的提问来源于stack exchange,提问作者Shubham Biniwale
相关产品推荐
相关产品推荐

