Access Restrictions per User: hide menus, buttons, reports, read-only users
by Aerya IT Solutions https://aerya.net$ 53.69
Odoo 17, 18, 19 and 20, Community and Enterprise · Developed in the European Union by Aerya IT Solutions
Hide menus, buttons and reports per user, and mean it
One restriction profile per role: hidden menus, hidden form buttons, hidden reports and actions, read-only users, allowed journals and warehouses. What protects data is enforced by the server, so the API, an import or a typed URL cannot get around it.
Hidden buttons and reports are refused over RPC too
Read-only users by access rights, allowed journals and warehouses by record rules
Administrators are never restricted: nobody locks you out
Runs on Odoo.sh and on-premise, not on Odoo Online (SaaS), where Odoo does not allow modules with Python code. Please buy the version that matches your database.
Screenshots of Odoo 17 Enterprise with the data of a fictitious company. The module works on Community and Enterprise.
profiles per user and group, menus, buttons in views, reports, server actions, read-only users, refusals over JSON-RPC, XML-RPC and report URLs, administrators never locked out, browser tours
no warnings, on the four versions
Community and Enterprise
A user sees buttons and menus that are not theirs
Odoo gives rights by groups, and groups are coarse. The person who enters purchase orders still sees the menus of apps they never use, the person who prints invoices still sees the button that resets them to draft, and a trainee still sees every report. Hiding things by editing views is fragile: it breaks on the next upgrade, and it hides nothing from someone who calls the same method through the API.
What it does
A restriction profile names users or groups and lists what they must not see or do: menus, buttons, reports, server actions, wizards. What protects data is enforced by the server, so a hidden button or report is refused over RPC and by URL too. The module only takes rights away: it never grants one.
How it works, step by step
- Install the module. With Invoicing or Inventory, the journal and warehouse restrictions install themselves.
- Create a profile. Open Settings, Users & Companies, Access Restrictions. In the Who group choose the users or the groups, implied groups included.
- Hide menus. On the Menus tab, pick the menus. Their submenus go with them.
- Hide buttons. On the Buttons tab, name the model and the method of the button. For example Reset to Draft is
button_drafton invoices. - Hide reports and actions. On the Reports and Actions tab, pick the reports, server actions and wizards.
- Check as the user. Log in as one of them: menus, buttons and reports are gone, and the server refuses them if called anyway.
- Lift it. Archive the profile and the restrictions end at once. A user in several profiles gets the restrictions of all of them.
Profiles, not scattered settings
Settings › Users & Companies › Access Restrictions: one profile per role names its users and groups (implied groups count) and holds everything they must not see or do. A user in several profiles gets all their restrictions.
Archive a profile to lift it at once; nothing to upgrade, no view to edit.

Buttons: hidden and refused
Name the model and the method of the button (Reset to Draft is button_draft on invoices). The button disappears from every view of the model for these users, and the server refuses the method when they call it from the web client, XML-RPC or JSON-RPC.

Reports and actions
Hidden reports leave the Print menu and are refused when printed, also through a /report/... URL or a portal download link. Hidden server actions leave the Action menu and are refused when run; hidden wizards leave the menu. Mail templates and scheduled actions that print as superuser keep working.

Read-only users
Tick Read-only Users: the users read everything their groups allow but cannot create, change or delete, enforced by the access rights on the server. Wizards, chat, notifications and their own preferences keep working, and you can leave some models writable (activities, for example).

Allowed journals
With Invoicing, the profile gets Allowed Journals. The users see and use only those journals, with their entries, journal items, payments and statements, through record rules: lists, reports, imports and the API all follow. Only the companies of the chosen journals are restricted.

Allowed warehouses and locations
With Inventory, Allowed Warehouses and Allowed Locations: other warehouses, their locations, operation types, transfers, moves and stock disappear for these users. Customer, vendor and transit locations stay usable, so deliveries and receipts work as usual.

More screenshots

Allowed journals on a profile

Allowed warehouses on a profile

A read-only profile with a writable model

The profiles of a user, on the user form

The same profile with the Spanish translation
Settings and options
| Read-only Users | The users read what their groups allow but cannot create, change or delete, enforced by the access rights. Wizards, chat, notifications and their own preferences keep working. A list of extra writable models is possible per profile. |
| Allowed Journals | With Invoicing. The users see and use only these journals, with their entries, journal items, payments and statements, through record rules, per company. |
| Allowed Warehouses, Allowed Locations | With Inventory. Other warehouses, their locations, operation types, transfers and moves disappear. Customer, vendor and transit locations stay usable. |
| Notes | A free text for the reason of the profile. |
Users with the Settings rights and the superuser are never restricted, so the configuration can always be corrected. Code that runs as superuser, such as mail templates and scheduled actions, keeps working.
What it does not do
- A hidden button refuses its method, not a plain change of the same field. Use read-only mode for that, or the field-level module.
- Hidden menus and wizards are screen restrictions. The data stays protected by the access rights, read-only mode and the record rules.
- Wizards stay usable in read-only mode, and a wizard that writes as superuser is not stopped.
- Reports reached outside the user's session are not refused: portal links opened without logging in, and PDFs already stored on a document, such as a sent invoice.
- Another route to the same result needs its own restriction, for example a customer accepting a quotation on the portal.
- The Export action is handled by core (group Access to export feature).
- Buttons of users, groups, access rights, views, menus, modules, settings and the profiles themselves, and methods that do not exist or are private, are blocked with an error that names the case.
Requirements
- Odoo 17, 18, 19 or 20, Community or Enterprise.
- Nothing beyond Odoo itself (
base,web). Journals need Invoicing and warehouses need Inventory. - A host that allows modules with Python code: Odoo.sh or your own server.
- English, Spanish, Romanian and Dutch translations.
Frequently asked questions
Can an administrator lock themselves out?
No. Users with the Settings rights are never restricted, whatever profile names them.
Does hiding a button stop an API call?
Yes. The server refuses the method from the web client, XML-RPC and JSON-RPC.
What if a user is in two profiles?
They get the restrictions of both.
Do I have to edit views?
No. Nothing is edited, so there is nothing to redo after an upgrade.
Do the mail templates and scheduled actions still work?
Yes. Code that runs as superuser is not restricted.
Explore our other apps
More modules by Aerya IT Solutions for Odoo 20, built to work together.
Questions or a custom quote?
Write to info@aerya.ro for questions about the module, its installation or custom development.
Developed in the European Union by Aerya IT Solutions, Odoo implementation and development. aerya.net
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 673 |
| Technical Name |
aerya_access_restrict |
| License | OPL-1 |
| Website | https://aerya.net |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module