Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
5423 Widoki

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

Awatar
Odrzuć
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?

Najlepsza odpowiedź

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
sie 25
3603
1
paź 24
2858
2
lip 24
2186
0
maj 23
2366
1
maj 23
5390