跳至内容
菜单
此问题已终结
5 回复
20257 查看

Hello,

how to hide app/modules in apps from specific user group?


Thanks

形象
丢弃
最佳答案

To hide specific apps or modules from a particular user group in Odoo, you can follow these steps:

1. Set User Access Rights (Security Groups)

  • Navigate to Users & Companies:
    • Go to Settings > Users & Companies > Users.
  • Create or Edit a User Group:
    • Navigate to Settings > Users & Companies > Groups.
    • Either create a new group or edit an existing one that should have restricted access.
  • Modify Access Rights:
    • For the group you want to restrict, adjust the Access Rights to remove permissions for the apps or modules you want to hide.
    • For example, if you want to hide the "Sales" app, make sure the group does not have any read, write, create, or delete rights for sale.order and related models.

2. Hide the Menu Items

If you want to prevent users in a specific group from seeing the menu items for certain apps or modules, you can hide the menu items using the groups attribute in the XML definition.

  • Locate the Menu Item XML:
    • Find the XML file where the menu item is defined for the app or module you want to hide.
  • Add the groups Attribute:
    • Modify the menu item to include the groups attribute, specifying the groups that should have access. Users not in these groups won't see the menu item.

Example:

xmlCopy code
  • In the above example, the "Sales" menu will only be visible to users in the base.group_user and sales_team.group_sale_manager groups.

3. Advanced: Hide the Entire Module

If you want to hide the entire module from a group, you can:

  • Override the Module’s Menu Definitions:
    • Create a custom module that overrides the menu items of the apps/modules you want to hide, restricting them to specific groups.
  • Using Python:
    • In some cases, you might need to write a Python method to control the visibility of apps based on user groups. This would involve overriding the get_menu_items method to filter out specific menus for certain groups.

4. Restrict Access to Apps in the App Switcher

If you want to hide the app from the main Odoo dashboard (app switcher), Odoo Enterprise users can:

  • Use Odoo's Enterprise Access Rights:
    • Go to Settings > Technical > User Interface > Menu Items and apply the appropriate group restrictions.

However, for Community Edition users, this requires custom development to restrict the visibility in the app switcher.

5. Test the Restrictions

  • Log in as a User in the Group:
    • After setting up the restrictions, log in as a user in the group to ensure the apps or modules are properly hidden and that access is restricted as expected.

These steps should help you hide specific apps or modules from particular user groups in Odoo. If you need more customized behavior, a small custom module might be required.

形象
丢弃
最佳答案

Hello Divya Vyas ,


Have a look at this:  https://www.odoo.com/sk_SK/forum/pomoc-1/hide-app-214521

Thanks & Regards,

Name : Yahoo Baba

形象
丢弃
最佳答案

simply just do not give them access rights to this specific module or app by going to Settings >> Users and Companies >> Users then choose your specified user and edit

In case this module is custom and you can't find its access rights, you have to ask your developer to manage this

形象
丢弃

That is not as simple as you put it. If you want for example, that the SUBSCRIPTIONS users (belonging to a Customer Service) are able to see the invoices linked to a subscription, you need to give them ACCOUNTING. Then, they are able to enter accounting and see all AR invoices. The intention is to see only subscription invoices, not all company sales. So it is not simple.

最佳答案

Hi Divya,


We had the same issue and installed a third party app for that reason (ie https://apps.odoo.com/apps/modules/15.0/kg_hide_menu/). Its not perfect but it works…

Keep in mind that data might still be accessible through RPC Calls.


Robert

形象
丢弃

This app does not hide an app. It hides menus. Read the request before posting.

最佳答案

Hi,

You can easily hide apps/modules from specific users using this app.

https://apps.odoo.com/apps/modules/16.0/hide_menu_user/

Regards

形象
丢弃

This app does not hide an app. It hides menus. Read the request before posting.

相关帖文 回复 查看 活动
1
7月 20
3314
2
12月 23
14134
0
10月 23
33
3
10月 23
788
1
10月 23
569