Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

How to restrict the contacts as user-only contacts in CRM and the Contact App

Naroči se

Get notified when there's activity on this post

This question has been flagged
restrictionContact
1 Odgovori
150 Prikazi
Avatar
Kaushal Kishore

How to set restriction on contacts so that the user can see only those contacts they created. They should not see even their own user/employee contact created when we create the user. However, the admin can see all the contacts and the user with group "User: All Documents".

I am using Odoo 19.0+e (Enterprise Edition).

I have tried many methods and solution posted on the forum and somehow through the suggested method, by adding the mentioned record rule, I can see the contacts are getting restricted for a user but when I click on any contact from the list, I am getting an error something like:
Uh-oh! Looks like you have stumbled upon some top-secret records.

Sorry, Ravi Singh (id=7) doesn't have 'read' access to: - Contact (res.partner)

If you really, really need access, perhaps you can win over your friendly administrator with a batch of freshly baked cookies.

Further, the Avatar Image is also not getting loaded for the restricted user after I add the record rule.

Please help.

0
Avatar
Opusti
Kaushal Kishore
Avtor

I am replying on this rather than commenting, as commenting is currently inactive/disabled (greyed out), so I was left with no other option.

I tried this, and this is not the solution. Let me explain what is happening here:
First, the links you shared are for Odoo On-premise (self-hosted version), and here at Odoo 19.0+e (Online version), I don't have access to the source code. All I can do is make changes via the GUI (Admin Zone > Developer Mode).

I followed all the steps carefully you mentioned, but it is indeed restricting the contacts view for the user. but if that user clicks on any contact in the list, which he is supposed to have access to, it throws the same error, and the avatar image is also not getting loaded.

There is something you might be missing, or the developers of Odoo Enterprise haven't revealed yet. I have also observed that Odoo's business model is to push the customer to partners for active support rather than giving support via the forum.

Are you willing to dig deeper with me to resolve this issue?

Please let me know what other info/screenshot/data you want from me in this regard.

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

To restrict contact visibility in Odoo, create a security group (e.g., "Contacts: Own Contacts Only") and a record rule ("Contacts: See Own Contacts Only") for the res.partner model. Apply the rule to the new group, granting "Read" permission. Use the domain [('create_uid', '=', user.id), ('user_id', '=', False)] to show only contacts created by the user, excluding their own user/employee contact by checking that the user_id field is False.


Apply the security group to the appropriate users. Ensure the "User: All Documents" group isn't affected by this rule. Test thoroughly, considering performance and upgrade compatibility. This setup allows users to see only their created contacts, excluding their own user contact, while admins retain full visibility.

Reference:-

* https://www.cybrosys.com/blog/how-to-create-record-rules-in-odoo-18

* https://www.odoo.com/documentation/19.0/developer/reference/backend/security.html

* https://www.youtube.com/watch?v=VffPH0GJ_IM


Hope it helps

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

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Setting Default Contact Creator as Salesperson in Odoo
v17 Contact
Avatar
Avatar
1
nov. 24
1328
How to restrict a user from viewing some certain contact in Odoo 17 Solved
contact restriction
Avatar
Avatar
Avatar
3
dec. 24
5734
How to connect one contacts to many companies?
contacts Contact
Avatar
Avatar
2
jun. 24
2213
How to IP restriction user wise in Odoo.sh Solved
restriction IP
Avatar
Avatar
1
sep. 23
2752
How to restrict visibility of contact according user/group Solved
contacts restriction
Avatar
Avatar
1
okt. 21
3698
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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