Skip to Content
Menu
This question has been flagged
1665 Views

I'm struggling to figure this out.  Based on how our company operates, I want to create a user group that filters contacts to only those that either have no sales team or the user is assigned to the sales team of the contact.  The contact filter for internal users is:

['|', ('type', '!=', 'private'), ('type', '=', False)]

So I created a new user group that limited contact to the user's teams (I made a modification to allow a user to be on one or more sales team).  The record rule for contacts in this group is:

[('team_id','in',[t.id for t in user.user_team_ids])]

When viewing contacts I can see all contacts regardless of the team.  My understanding is Odoo is combining record rules so the type=False is allowing me to see all contacts.


Any suggestions on how to go about this? Ultimately I think the contact record rule for my new group should include contact if team_id=False as well.


Avatar
Discard