Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

How to restrict visibility of customers & contacts for sales persons to only their own?

By
abou
on 2/11/13, 3:45 AM 7,439 views

we need to split the contact , customers for each sales person so each sales person responsible of certain customers so the other sales man shouldn't see the other sales contacts or customers

4

Olivier Dony (odo)

--Olivier Dony (odo)--
2112
| 7 6 7
--Olivier Dony (odo)--

 

Olivier Dony (odo)
On 2/11/13, 6:46 AM

You can do that rather easily with Access Rules, similarly to what is done by default for the "See Own Leads" group.

  1. Create a new group for your sales persons, or modify the existing "Sales User" group if you'd like this to apply to all of them.
  2. In the Rules tab of the group, click Add, then choose Create at the bottom of the pop-up.
  3. Choose a name, then choose "Partner" as the object, then carefully copy/paste the following in the Rule Definition box:

    ['|',('user_id','=',user.id),('user_id','=',False)]

  4. Save
  5. To test: login as a Sales User, who is not the Administrator (Access Rules do not apply for the Administrator)

Note: You need to enable the Technical Features access right for the administrator in order to perform these changes.

But when giving the above security rule to a user, the user is unable to create a contact. How to overcome this prob?

vivek
on 4/29/13, 2:58 PM

The user must be an "Employee" in the access control to be able to create contacts.

Timothy Solomon
on 9/16/13, 6:51 AM
1
Bertrand THERY
On 9/9/14, 12:30 PM

After setting the rule in Partner Object to ['|',('user_id','=',user.id),('user_id','=',False)], indeed a user cannot access anymore to the customers list of the other users.

But one problem is still remaining : when creating a new customer in Opportunities, if the user enters 2 or 3 letters (lets say "AB" for example) in the customer field then a list of customer names containing the string "AB" will appear. Then the user will be able to select a customer of the proposed list and see all the details of the contact by clicking on the square at the right of the field.

Does it exist a way to avoid that ?

0
Hamid Darabi
On 10/8/16, 10:30 PM

I have Odoo 9 installed. We need to restrict users to see each other's contacts. Everything works perfectly when I copy the code but I need to do some extra checks. As a sales rep I want to see all contact I created plus those that someone assigned to me (by choosing me in the Sales person field)

['|',('user_id','=',user.id),('create_uid','=',user.id)]

Still everything is fine in my contact list and customer list. As soon as I open the sales dashboard or pipeline, I get this error:

The requested operation cannot be completed due to security restrictions. Please contact your system administrator.
(Document type: res.users, Operation: read)

What am I missing here?

 

0
dbvieira
On 9/28/16, 7:06 AM

...."Apparently, this cannot currently be done in v7".....???????????????????????????
This is kind of basic 101 CRM.....

0
Gilles Major (gim)
On 2/11/13, 6:05 AM

Apparently, this cannot currently be done in v7, though you can "split" leads, opportunities, quotations and sales order by setting the sales => "see own leads" access rights in the user form. But once the contacts are created in the db, everyone who has the necessary rights can see them.

0
Igor MF
On 6/25/14, 12:44 PM

The suggested rule ['|',('user_id','=',user.id),('user_id','=',False)] restricts the user to see only contacts they are set as salesperson or contacts that have no salesperson. I prefer to restrict it to who created the user. to do that, replace the rule with [('create_uid','=',user.id)]

@abou, please mark the "correct" answer if it helped you

Igor MF
on 6/25/14, 12:45 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 2/11/13, 3:45 AM
Seen: 7439 times
Last updated: 10/8/16, 10:30 PM