Odoo Help

Welcome!

This community 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.

0

How can we assign the right department to an employee in a multi-company environment?

By
Yves Geoffroy
on 4/1/14, 1:01 PM 1,241 views

In a multi company environment, I created the same department structure (HR configuration) for all the companies ... sales, accounting, finance, production, etc. When I want to assign a department to an employee, who belongs to a company (company_id), I see all the departments of all companies but the company name associated to the department is not listed. So I can see 5 times "sales", 5 times "accounting", etc. I think we should see only the departments of the company id of the employee! Is it a bug or am I missing something?

Thanks!

I understand I can allow access to one company at a time for my superuser but it's a little painfull.

Yves Geoffroy
on 4/1/14, 5:07 PM

Yes, this is an annoying problem. The workaround I have used is to create departments with the company initials like Sales (ABA) and Sales (DRD). When selecting, I know the employee's company (is listed) and select the right one. It's more work on our end, and seems like something the system should be wary of. However, I'm sure if it forced you to select only that employee's company, there would be another use-case where someone wanted to put them in another company department for some reason.

Elephante, Sean Samborski
on 4/10/14, 2:17 AM

Good idea, I will put the company's initials.

Yves Geoffroy
on 4/11/14, 7:30 PM
0

Med Said BARA

--Med Said BARA--
2664
| 5 5 7
Algeria
--Med Said BARA--
Med Said BARA
On 4/1/14, 9:31 PM

Hi;

You are right; but i don't know if we can call it a " bug", so let's call it "a missing functionality".

When browsing the code in hr.py (HR module), you can see that there is a method "onchange_company" for the class hr_employee, which is executed when you select the company in the hr_view; but unfortunately it' just used to fill the company adress.

We can do the same, for the hr_job class, to filter only the departments belonging to the related company.

Maybe, we can do it with the same method (onchange_company), by returning 2 values instead of one, one for the adress_id and the second for department_id.

But how can we achieve this task , without patch, and patch again after each update?

In fact, i am also facing a similar issue, in sale order, when selecting a Shop or a Pricelist, i get the full list of Shops and PriceLists from all companies ...

This is really an annoying situation.

Yves, keep connected, and follow this question.

Best regards.

Thanks for answering!

Yves Geoffroy
on 4/4/14, 10:24 AM

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/1/14, 1:01 PM
Seen: 1241 times
Last updated: 3/16/15, 8:10 AM