跳至内容
菜单
此问题已终结
2 回复
540 查看

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 )

形象
丢弃

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.

编写者 最佳答案

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?

形象
丢弃
编写者

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.

最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
1
5月 25
1605
1
3月 25
1722
1
2月 25
5137
2
2月 25
3354
2
2月 25
2464