I am new to odoo v8 and i am not able to understand the relationship between res_partner and res_users tables and also with hr_employee table are they all related?
3 Answers
The relationship between res.partner
and res.user
is that res.user
inherits from res.partner
using an inheritance type called "Delegation Inheritance" (see documentation).
Because of "Delegation Inheritance" every res.user
record has a mandatory internal connection to a corresponding res.partner
record using a field partner_id
. What is this connection all about is to directly use all the fields of res.partner
to store data shared by res.user
and res.partner
(i.e. name, phone, etc... if for example you refer to phone property of a record of res.user
you'll get the value stored in the corresponding res.partner
record) so res.user
has to define fewer number of fields on it's own, like password, login, etc..
Note also that because of this relation res.user
can NOT exist in the system without corresponding res.partner
, it's why every res.user
has one, but nonetheless res.partner
can exist without res.user
.

- 467
- 5
- 8
Actually only res.users has a "real" relationship to res.partner, because with every user odoo will create a partner (per default no customer and no supplier). this partner will be used e.g. for emails and the followers system in odoo.
But you can have partners without users, too. That will be a normal partner, for defining customers and suppliers.
And finally there is the employee. You can set a user on it. If i recall right, the user will be used for attendances and timesheets.

- 13,553
- 3
- 25
- 38