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

Setup:

  • Enable Multi-company setup but disabled Common Contact Book  and Common Product Catalog options.

  • Create company x and company z. both company has no parent company

  • Create a User A with access to Company X only
  • Create a User B with access to Company Z only

Expected:

  • User A should not be able to access Company Z employees
  • User B should not be able to access Company X employees

Findings:

  • User A can access Company Z employees
  • User B can access Company X employees

Is our findings the default behavior for employee module in multi-company setup? Or our setup is wrong?? Is there a way to achieve our expected behavior?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Add a security rule to filter the employees according to the company.

Goto Settings -> Security -> Record Rules -> Create, Select the Employee Object and

Add this filter in Rule Definition.

[('company_id', '=', user.company_id.id)]


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

Thank you for replying. This one worked but would prompt access error when accessing our old employees as shown below

The requested operation cannot be completed due to security restrictions. Please contact your system administrator.

(Document type: Contact, Operation: read) - (Records: [41], User: 6)

You should update companies in employee master anyway and I just gave u an example. Update that according to your needs. 

On Thu, 12 Sep 2019, 2:30 pm Ezra, <jasmen@apollo.com.ph> wrote:

Thank you for replying. This one worked but would prompt access error when accessing our old employees as shown below

The requested operation cannot be completed due to security restrictions. Please contact your system administrator.

(Document type: Contact, Operation: read) - (Records: [41], User: 6)

Envoyé par Odoo S.A. using Odoo.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 25
1077
0
thg 1 16
3250
1
thg 7 23
1681
0
thg 11 15
4285
0
thg 8 25
251