Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Real Estate
    • Real Estate Agency
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consulting
    • Accounting Firm
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Solar Energy Systems
    • Shoe Maker
    • Serveis de neteja
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

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

Subscriure's

Get notified when there's activity on this post

This question has been flagged
20 Respostes
53938 Vistes
Avatar
abou

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

2
Avatar
Descartar
Avatar
Olivier Dony (odo)
Best Answer

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.

8
Avatar
Descartar
vivek

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

Timothy Solomon

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

Avatar
Hector
Best Answer

I have tried creating a new group and adding the following rule ['|',('create_uid','=',user.id),'|', ('id','=',1),('id', '=', user.partner_id.id)] and it's working for me, I have used ('id','=',1) cause 1 is the id of the company he belongs to and the user should has access to this, for example if he wants to print pdf file and it has in the header information about the company. And I put also ('id', '=', user.partner_id.id) cause he need to get access to himself. I'm using version 9.

4
Avatar
Descartar
Wided Kefi

Your solution is working for me, I'm using version 11. I added also two more condtions:

['|','|','|',('create_uid','=',user.id),('id','=',1),('id', '=', user.partner_id.id),'&',('customer','=',False),('supplier','=',False)]

&',('customer','=',False),('supplier','=',False) to see also the other system users.

Hector

I'm very glad to hear that, good luck

Avatar
Firas Mahmoud
Best Answer

What is the valid answer for this question in Odoo 11?

1
Avatar
Descartar
Avatar
Igor MF
Best Answer

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)]

1
Avatar
Descartar
Igor MF

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

Avatar
Bertrand THERY
Best Answer

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 ?

1
Avatar
Descartar
Avatar
DevIntelle Consulting Service Pvt Ltd
Best Answer

HI , 

Salesperson Can see Own Customer & Sale Orders


https://www.odoo.com/apps/modules/11.0/dev_partner_access/


This module will help you!

0
Avatar
Descartar
Avatar
Vivid IT Solutions
Best Answer

Can Anybody help me to restrict users to view only their contacts in version 11.

The above rules are not working in version 11.

0
Avatar
Descartar
Avatar
dbvieira
Best Answer

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

0
Avatar
Descartar
Avatar
Apple Mahmud
Best Answer
Hi there, please use this code into your record rules      
<record id="rules_for_salesperson" model="ir.rule">
<
field name="name">Salesperson Record Rules</field>
<
field name="model_id" ref="sale.model_res_partner"/>
<
field name="domain_force">[('user_id','=',user.id)]</field>
<
field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]" />
</
record>

0
Avatar
Descartar
Avatar
S****** D******
Best Answer

Hi,

Someone could give the way to proceed into the code for V10 ?

Thanks

0
Avatar
Descartar
Avatar
Gilles Major (gim)
Best Answer

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
Avatar
Descartar
Avatar
Hamid Darabi
Best Answer

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
Avatar
Descartar
NSC

Have you found any solution for that in the meantime?

Hamid Darabi

I don't remember what was the solution and don't have access to the code anymore.

I just remember I found a calculation in the dashboard that was counting something for all sales reps and the restriction I added to the partner object conflicted with that.

Avatar
Sehrish
Best Answer

We can show records that are related to active users using dynamic domain on action menu.

Let say we have a company and in that company we have different active user related to different department. And we want to display some data or records in a tree view or list view according to active user department, when some one clicks on related menu. To achieve this goal we need to create dynamic domain on action window.

Solution

To put domain on action window we need a computed filed in Odoo 8 or function field in older version of Odoo, in that computed field we need to create two method first one for computed field and second one for search.

For more information read: http://learnopenerp.blogspot.com/2017/11/show-records-on-treeview-that-are.html

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now