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.
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.