CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
This seems like it probably has a basic answer, but its left me baffled. Why do users (res.users) and companies (res.company) each have a many2one 'partner_id' field? From my testing it seems this corresponding partner is what is used to check access rights rather than the user/company itself. But users and companies inherit from res.partner anyway...so why do they need this separate partner object linked to them?
Can anyone tell me what I am missing here?
For generalization purposes
res.partner is used for personal data, regardless whether this is a customer, supplier, company or a user. This makes sense, because otherwise contact data will be spread over several tables. So there is for example only one E-Mail field in the whole system.
res.company does not inherit form
res.user inherits from res.partner, but there are 2 types of inheritance (see Developer Docu)
res.user uses the second type, it only is related to a
partner_id. But the fields of
res.partner are not directly accessible (with
_inherit they would be directly accessible, but the fields would then also be in the
_inherits in this case assures that the contact data stay in DB table
res_partner instead of
About This Community
Odoo Training Center
|Asked: 3/3/13, 10:51 PM|
|Seen: 2380 times|
|Last updated: 3/16/15, 8:10 AM|