Overview
Groups hide menus for whole roles, but sometimes a single user must not see a menu. This module adds a Hide Specific Menu tab on the user and a Restrict users tab on the menu itself. A record rule on ir.ui.menu enforces the hiding. The benefit is precise per-user menu control without creating new groups.
Usage steps
- 1
Open the user form
The administrator opens Settings > Users and selects a user. A page named Hide Specific Menu is added. It is hidden for administrators because they cannot be restricted.
- Page: Hide Specific Menu
- Field: is_admin
- 2
Pick the menus to hide
In the page the administrator adds menu items to the hide_menu_ids list. Each selected menu is removed from that user interface. Users keep all their other menus.
- Field: hide_menu_ids
- Many-to-many with menus
- 3
Or restrict from the menu
Menu items have a Restrict users tab where the administrator lists the users who must not see it. Both directions update the same relation. This suits hiding one menu from several users.
- Tab: Restrict users
- Field: restrict_user_ids
- 4
Enforced by a record rule
The security file defines the rule Restrict Menu from Users on ir.ui.menu. It filters out menus listed for the current user. The change takes effect after the user reloads.
- Rule: Restrict Menu from Users
- Applies after reload
Screens
Illustrative mockups with placeholder data.
—
Added by this module
—
Added by this module
Roles
| Role |
|---|
| System administrator |
Dependencies
Want to know more or try this app? Contact us
We can arrange a demo or a trial and answer your questions about Hide Menu per User.