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.
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 :)
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).
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 11/16/15, 4:47 AM|
|Seen: 328 times|
|Last updated: 11/16/15, 2:32 PM|