I’m trying to restrict access to certain menus in Tryton based on user groups. For example, I want to hide the “Party Category” submenu under the “Parties” menu for certain users, while keeping it visible for others (like admin).
So far, I’ve been directly manipulating the database tables such as ir_ui_menu-res_group and ir_menu to add or remove access. However, this approach often leads to unintended consequences—for example, sometimes the menu gets hidden from the admin user as well, or completely disappears.
Is there a recommended and safe way to control which user groups can see which menu entries?
It would be really helpful if someone could walk me through the proper approach to menu-level access control in Tryton, ideally without breaking access for the admin or needing to touch the database directly.
You could create new permission access and make the access to the menus you want to hide more restrictive, so only those with the new permission can view them.
You don’t have to hide the menu to an user/group but give access to another, for example, if you have group_1 and group_2, and you want a menu only available for group_1, then go to this group, in the menu i’ve shown before, and give him the menu access, then automatically the group_2 won’t have access
In the Access Permissions → Access Menu Tab, I added a few menus, but then after clicking the save button they disappeared from the Access Menu list, and now when adding the Add button again, I can’t find those menus, I don’t know if this should happen.
If your user is not in the restricted groups that you added, it is normal that you do not see them anymore.
Remember “admin” has nothing special, he is just in all groups by creation.