Hello, to restrict an Odoo user to only view their own invoices, follow these steps:
1. Enable Developer Mode: Settings > "Activate the developer mode".
2. Create a Group: Settings > Users & Companies > Groups > Create "Own Invoices Only" (Application: Accounting).
3. Set Access Rights: In the group, under "Access Rights," add "Invoices" (account.move) with Read enabled, Write/Create/Delete disabled.
4. Add Record Rule: Settings > Technical > Record Rules > Create:
- Name: "Own Invoices"
- Model: Invoices (account.move)
- Groups: "Own Invoices Only"
- Domain: `['|', ('invoice_user_id', '=', user.id), ('user_id', '=', user.id)]`
- Apply for Read: True, others False.
5. Assign User: Settings > Users & Companies > Users > Edit the user > Add to "Own Invoices Only" group, remove from broader invoice access groups (e.g., Billing).
This limits the user to viewing only their own invoices. Adjust if custom modules are in use.
Thanks you ! Works perfectly
I just hope that if a Customer calls to speak to John about their Invoice on the day he had to leave on an emergency and Jane really wants to help, that the Customer will understand that only John can help! ;)