Record rules for sales teams to divide permissions by team

Source: Internet
Author: User

"This content is tested in 9.0 Enterprise Edition"

In Odoo's CRM use process, we sometimes hope that multiple sales teams are not visible to each other, the system by default only to view their own permissions and view all the permissions two options.

We have two objects to deal with, one is Crm.team and the other is res.users. Let's take crm.team as an example of how to restrict access to crm.team objects.

We created 2 team members named a team and B Team,a team TL is a1,b team TL is B1, member B2.

Create a record rule, the object is Crm.team, the rule is defined as follows:

[('member_ids','in', [user.id])]

Member_ids is a field of crm.team, which means that if the current user is affiliated with the team, you can read and write additions and deletions, and set the record rule to view your own thread group.

The effect is as follows:

Both B1 and B2 can only see Team B.

The second step is to set a similar record rule to res.users, restricting it to only read members of the team, as follows:

In this way, we have achieved the beginning of the purpose of the first without the premise of two open.

Record rules for sales teams to divide permissions by team

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.