Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
5444 Vizualizări

"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?

Imagine profil
Abandonează
Autor

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?

Cel mai bun răspuns

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.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
aug. 25
3616
1
oct. 24
2886
2
iul. 24
2192
0
mai 23
2374
1
mai 23
5398