Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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).
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 11/16/15, 4:47 AM|
|Seen: 534 times|
|Last updated: 11/16/15, 2:32 PM|