Odoo Help


why hr.employee is not inherited with res.partner?

Amit Kumar
on 11/16/15, 4:47 AM 892 views


I want to know the logic behind creating "hr.employee" model for employees. Why not employee should "res.partner".

When we create a employee one record is created in hr_employee, if we want to assign a user for every employee then we have to create a user and then a partner will automatically created. This created partner is not used in employee record but every time when we create a employee an extra partner is created that is not in used. So why hr.employee is not inherited with res.partner?

Please explain the logic behind it.  


Vale Trood

--Vale Trood--

| 5 2 7
Tunis, France
--Vale Trood--

Vale Trood
On 11/16/15, 7:50 AM

Hello my friend;

The main class is in addons/base/res/res_users.py. In all the other models we just inherit the main class.

I think if you follow those links you will be able to get the answer and understand :) 

To clarify.

res.partner is an ORM Model. An ORM model describes a class of objects in the database and provides a series of ORM methods to allow you to manage them in code (create, write, unlink etc).





Thank you for reply. These links I have already checked but I am not able understand the logic behind this concept. Support I have to create a module name school_management, and there are two types of person record like student and parent. My question is that student and parent record should be inherited with res.partner or I have to create separate record(class) for both. Every student and parent have user for login by website. So plz suggest me the proper way to do this without creating redundant record in database(like hr.employee record according to my root question ). Thanks

Amit Kumar
on 11/16/15, 2:21 PM

hello my friend, i did not understand very well what you want i need conceptional model if you want send me any thing you have about what you want and here is my mail: abdelwahed_rihene@yahoo.fr

Vale Trood
on 11/17/15, 4:09 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/16/15, 4:47 AM
Seen: 892 times
Last updated: 11/16/15, 2:32 PM