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
13538 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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)]


Awatar
Odrzuć
Autor

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.

Powiązane posty Odpowiedzi Widoki Czynność
1
lut 25
1032
0
sty 16
3235
1
lip 23
1659
0
lis 15
4245
1
sie 25
661