This question has been flagged
1 Reply
4188 Views

"Employees(hr.employee)" model's "Home Address(address_home)" field is defined as reference to "Partners(res.partner)" model. Therefore, when I want to enter an employee's "Home Address" field, I have to make an "Partners" instance first. And in "Partners" instance, I can enter an address.

But this doesn't make sense for me at all. Because "Partners" model also has fields such as "Company(e.g. ASUStek)", "Job Position(e.g. Sales Director)", "Title(e.g. Dr.)". These fields are not necessary for "Home Address". This database design is strange. And Odoo shows all Partners list that are not related to "Home Address" is also not good.

If Employee's "Home Address" field is defined as reference to a model (for example, "Address" model) that has only "Country", "States", "City", "Address", it makes sense for me.

Can anyone explain the meaning of this design or teach me a work-around solution?

Avatar
Discard
Author

Thank you for your answer, Ray. However I still want a solution for my purpose. I'd like to store our employee's address by more reasonable way. Is it possible to extend "Employee" model to disable existing "Home Address" from its view and add new "Home Address" field that is simply implemented by "Char" format? And may this approach cause any problem?

Best Answer

The design that Odoo chose has Individuals and Companies in the same model.  You choice is just as valid as theirs.  Yours would not make sense the them in the same way theirs doesn't make sense to you.

Avatar
Discard