Skip to Content
Menú
This question has been flagged
2 Respostes
442 Vistes

in contacts all the contacts are accumulated like vendors, Clients, Employees etc. How to restrict access to clients (any specific group of contacts) from different different employees using Odoo as a user (Note: I want all employs have access to contacts of all employees )

Avatar
Descartar

Its unclear what/whom you want to restrict to what exactly, however, in general, you want to set up Record Rules. See https://www.odoo.com/documentation/18.0/applications/general/users/access_rights.html or https://www.odoo.com/documentation/18.0/developer/reference/backend/security.html#record-rules for a more technical documentation.

Autor Best Answer

I have assigned a specific tag to all the contacts like "Employee", "Client", "Vendor" Etc.


I want that only one user that is admin have visibility to these all and other employees have visibility to only contacts tagged by "Employee"

   

When I have created below rule its removing the Admin it self as it not tagged

What wrong i am doing ? What is right way to do it ?


Record rule for contact : [("category_id.name", "in", "Employee")]


Why it is affecting to un-tagged users and even admin too?

Avatar
Descartar
Autor

While Exploring and setting up odoo for our team the below record rule is restricting access of AI agent to that particular group.

Record rule on res.partner:
['|', '|',

('category_id.name', 'in', ['Employee', 'Vendor']),

('id', 'in', [1, 2,]),

('create_uid', '=', user.id),

]

this record rule is essential as its limiting the same group from accessing some un-tagged contacts so we can't remove that.

Can anyone help us to understand how can we provide access of the AI agent along with restricting the group from accessing or reading some contacts based on tags.

You can suggest if there is any alternat way to restrict group from particular contacts to if it can resolve this conflict.

Best Answer

Hi,

To control access to contacts in Odoo, start by creating a new security group and assign it to users who should have limited access. Next, define a record rule on the res.partner model for this group, using a domain to exclude client contacts based on their category or tag. At the same time, create a separate record rule that specifically grants access to employee contacts, filtering by the category/tag used to mark employee records. You can customize the access levels (Read, Write, Create, Delete) in each rule to suit your specific requirements


Hope it helps

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de maig 25
1410
1
de març 25
1550
1
de febr. 25
2659
2
de febr. 25
2772
2
de febr. 25
2234