Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5170 Lượt xem

Hello,

I am trying to add related user to an already existing employee. Creating a new user automatically add employee record for the user and then I cannot add user to the existing employee as it causes error "A user cannot be linked to multiple employees in the same company.". To do so I have to delete employee record created automatically and then add the user to the existing employee record. 
Is there a way to not create a employee automatically from creating a user. Or when trying to add related user to employee and choosing "create and edit" option, it should create a user and link it to the employee instead of creating a new employee. 

I appreciate your help. 

Ảnh đại diện
Huỷ bỏ

I am searching for a module with this behavior, please tell me the name of the custom module.

Câu trả lời hay nhất

Odoo doesn't create an Employee (hr.employee) record when you create a User (res.users) record.

If this is happening, please check custom modules and/or automations as this is not what happens out of the box.

https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/models/res_users.py#L251

Ảnh đại diện
Huỷ bỏ
Tác giả

Hi Ray, Thanks for the answer. You are right. A custom module was causing the issue.

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 15
6721
4
thg 3 15
11991
1
thg 11 23
5766
1
thg 3 24
6954
1
thg 11 19
7425