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

While trying to update a profile of a new employee, under the HR tab of the employee profile, I am unable to select a staff member as a related employee as each time I try, the attached error message pops up. Kindly asist


Awatar
Odrzuć
Najlepsza odpowiedź

Like the error says, you need to make sure the user that you are selecting is not mapped on any other employee profile.

You can easily identify whether any user linked with multiple employees by Grouping or filter the employees by "User"


Awatar
Odrzuć
Najlepsza odpowiedź

Hi,


The error is caused by trying to assign a single system user (res.users) to more than one employee (hr.employee) within the same company.


In Odoo, there's a strict one-to-one relationship between 'res.users' and 'hr.employee' per company. This is enforced by design to avoid issues in HR workflows (attendance, approvals, access control, payroll, etc.).


Solution


1- Unlink the user from the other employee

             - Find the other employee who is currently linked to the user you want to use and remove the user from the "Related User" field.


2- Create a new user account.

         - Duplicate the original user or create a new one under Settings > Users & Companies > Users and assign the new user to the second employee.


3- Use multi-company logic (if needed)


Hope it helps

Awatar
Odrzuć
Najlepsza odpowiedź

Hi, I have the error, but when I try to search for employees linked to the users, as suggested, none show up. I have just 4 users and 4 employees in the database, so it's not complicated. Yet, the system insists that 2 of the users already have employees assigned, when clearly they have not.

This likely happened due to the following steps:

  1. User was created and connected to database
  2. Employee was created manually
  3. Another Employee was created using the "Create employee" button on the user record
  4. The two employee records were merged, but for some reason the "Related employee" field is empty in the resulting record
  5. Now the related employee cannot be filled in

For the remaining 2 employee records, which were created only using the "Create employee" button, the field is filled in automatically and works.

This appears to be a straightforward bug.

Awatar
Odrzuć
Najlepsza odpowiedź

Hi, I hope you are getting the following error.

This means that the user is already selected under some other employee profile. To identify this, please search for the following.

Then you can view the employee record associated with the user.

Awatar
Odrzuć