Skip to Content
Menu
This question has been flagged

Hello,


I have a situation in a multi company environment where I want one of my user to have access to both of my companies A & B.

Moreover, this user must have access to the accounting of company A but not B.

Is it possible in Odoo to define application access rights per company ?

How can I achieve this ? By using record rules ? If so, how ?


Thank you for your help.


Have a nice day,


Julien

Avatar
Discard

I believe you just want to add both companies under the user his preferences. This way the user gets access to both companies and can switch between companies by the toggle option at the right top of the screen. :)
Go to Settings > Users > Users, open up the user and add both companies to his user. After a browser refresh he/she can see both companies.

but that doesn't solve the problem that the user can see, for example, the accounting in company A but not in B, does it?

Author

Hello Yenthe,

Thank you for your answer.

The user already has access to both companies but here, I only want him to be able to see the accounting of company A.

I am familiar with access rights but not in this case.

I believe this can not be done with simple configuration and requires a third party app...

Author Best Answer

So, this can be done using only record rules.

I created special groups for this user based on the default accounting user groups.

Created record rules for each access right with the following domain :

[('company_id', '=', 2)]

Check the ID of your company in the general settings.

There are some adjustments to make to these record rules because some of them will generate Odoo Server Error but you can just archive them.

The process can take quite some time but it is working without modifying the code while waiting for this feature to be standard in Odoo.

Hope it helps.


Avatar
Discard
Best Answer

Simply!! don't waste your time.. 

Click on the link below where there is an application that can fulfill your requirement :

https://apps.odoo.com/apps/modules/15.0/oi_multi_company_access/

Avatar
Discard
Related Posts Replies Views Activity
1
Mar 24
524
2
Mar 24
424
2
Dec 23
1439
2
Feb 21
16664
1
May 20
2878