diff --git a/hide_menu_user/README.rst b/hide_menu_user/README.rst new file mode 100644 index 000000000..25c530551 --- /dev/null +++ b/hide_menu_user/README.rst @@ -0,0 +1,53 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Hide Any Menu User Wise +======================== +* Hide Any Menu User Wise + +Installation +============ +- Install our custom addon + +Configuration +============= +- Additional configuration not required + +License +------- +Lesser General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V19)Ashwin A, +(V18)Sreerag PM, +(V17)Ranjith R , + + Contact : odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/hide_menu_user/__init__.py b/hide_menu_user/__init__.py new file mode 100644 index 000000000..6eeac8379 --- /dev/null +++ b/hide_menu_user/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/hide_menu_user/__manifest__.py b/hide_menu_user/__manifest__.py new file mode 100644 index 000000000..e41b1b1ca --- /dev/null +++ b/hide_menu_user/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Hide Any Menu User Wise', + 'version': '19.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'This Module Helps To Hide any Menu items user wise.', + 'description': """This module provides functionality to hide or restrict menu + items on a per-user basis in Odoo. + With this feature, administrators can manage which menus each user is allowed + to see. It ensures that users only have access to the relevant parts of the system, + improving both security and usability.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base'], + 'data': [ + 'views/res_users_views.xml', + 'views/ir_ui_menu_views.xml', + ], + 'license': 'LGPL-3', + 'images': ['static/description/banner.jpg'], + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/hide_menu_user/doc/RELEASE_NOTES.md b/hide_menu_user/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..83c637630 --- /dev/null +++ b/hide_menu_user/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 19.09.2025 +#### Version 19.0.1.0.0 +#### ADD + +- Initial commit for Hide Any Menu User Wise diff --git a/hide_menu_user/models/__init__.py b/hide_menu_user/models/__init__.py new file mode 100644 index 000000000..c1789b61d --- /dev/null +++ b/hide_menu_user/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import ir_ui_menu +from . import res_users diff --git a/hide_menu_user/models/ir_ui_menu.py b/hide_menu_user/models/ir_ui_menu.py new file mode 100644 index 000000000..b29472835 --- /dev/null +++ b/hide_menu_user/models/ir_ui_menu.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class IrUiMenu(models.Model): + """ + Model to restrict the menu for specific users. + """ + _inherit = 'ir.ui.menu' + + restrict_user_ids = fields.Many2many( + 'res.users', string="Restricted Users", + help='Users restricted from accessing this menu.') + + def _filter_visible_menus(self): + """ + Override to filter out menus restricted for current user. + Applies only to the current user context. + """ + menus = super()._filter_visible_menus() + + # Allow system admin to see everything + if self.env.user.role == 'group_system': + return menus + return menus.filtered( + lambda menu: self.env.user.id not in menu.restrict_user_ids.ids) diff --git a/hide_menu_user/models/res_users.py b/hide_menu_user/models/res_users.py new file mode 100644 index 000000000..c583e9846 --- /dev/null +++ b/hide_menu_user/models/res_users.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class ResUsers(models.Model): + """ + Model to handle hiding specific menu items for certain users. + """ + _inherit = 'res.users' + + hide_menu_ids = fields.Many2many( + 'ir.ui.menu', string="Hidden Menu", + store=True, help='Select menu items that need to ' + 'be hidden to this user.') + is_show_specific_menu = fields.Boolean(string='Is Show Specific Menu', + compute='_compute_is_show_specific_menu', + help='Field determine to show the hide specific menu') + + def write(self, vals): + # Store old hide_menu_ids per record + old_hide_menu_map = {record.id: record.hide_menu_ids for record in self} + res = super().write(vals) + for record in self: + old_hide_menu_ids = old_hide_menu_map.get(record.id, + self.env['ir.ui.menu']) + # Add new restrictions + for menu in record.hide_menu_ids: + menu.sudo().write({'restrict_user_ids': [fields.Command.link(record.id)]}) + # Remove old ones that are no longer selected + removed_menus = old_hide_menu_ids - record.hide_menu_ids + for menu in removed_menus: + menu.sudo().write({'restrict_user_ids': [fields.Command.unlink(record.id)]}) + return res + + @api.depends('group_ids') + def _compute_is_show_specific_menu(self): + """ compute function of the field is show specific menu """ + group_id = self.env.ref('base.group_user') + for rec in self: + if group_id and group_id.id in rec.group_ids.ids: + rec.is_show_specific_menu = False + else: + for menu in rec.hide_menu_ids: + menu.restrict_user_ids = [fields.Command.unlink(rec.id)] + rec.hide_menu_ids = [fields.Command.clear()] + rec.is_show_specific_menu = True diff --git a/hide_menu_user/static/description/assets/calendar.png b/hide_menu_user/static/description/assets/calendar.png new file mode 100644 index 000000000..0e34d7a39 Binary files /dev/null and b/hide_menu_user/static/description/assets/calendar.png differ diff --git a/hide_menu_user/static/description/assets/chart.png b/hide_menu_user/static/description/assets/chart.png new file mode 100644 index 000000000..476838c70 Binary files /dev/null and b/hide_menu_user/static/description/assets/chart.png differ diff --git a/hide_menu_user/static/description/assets/chat.png b/hide_menu_user/static/description/assets/chat.png new file mode 100644 index 000000000..fd7f0ddf5 Binary files /dev/null and b/hide_menu_user/static/description/assets/chat.png differ diff --git a/hide_menu_user/static/description/assets/close.png b/hide_menu_user/static/description/assets/close.png new file mode 100644 index 000000000..aa186f9b6 Binary files /dev/null and b/hide_menu_user/static/description/assets/close.png differ diff --git a/hide_menu_user/static/description/assets/copy.png b/hide_menu_user/static/description/assets/copy.png new file mode 100644 index 000000000..a7b6439f2 Binary files /dev/null and b/hide_menu_user/static/description/assets/copy.png differ diff --git a/hide_menu_user/static/description/assets/document.png b/hide_menu_user/static/description/assets/document.png new file mode 100644 index 000000000..9c43e81c0 Binary files /dev/null and b/hide_menu_user/static/description/assets/document.png differ diff --git a/hide_menu_user/static/description/assets/idea.png b/hide_menu_user/static/description/assets/idea.png new file mode 100644 index 000000000..801ce549d Binary files /dev/null and b/hide_menu_user/static/description/assets/idea.png differ diff --git a/hide_menu_user/static/description/assets/imple.png b/hide_menu_user/static/description/assets/imple.png new file mode 100644 index 000000000..5f1b94d5f Binary files /dev/null and b/hide_menu_user/static/description/assets/imple.png differ diff --git a/hide_menu_user/static/description/assets/mail.png b/hide_menu_user/static/description/assets/mail.png new file mode 100644 index 000000000..0b0462370 Binary files /dev/null and b/hide_menu_user/static/description/assets/mail.png differ diff --git a/hide_menu_user/static/description/assets/people.png b/hide_menu_user/static/description/assets/people.png new file mode 100644 index 000000000..069cd656c Binary files /dev/null and b/hide_menu_user/static/description/assets/people.png differ diff --git a/hide_menu_user/static/description/assets/play.png b/hide_menu_user/static/description/assets/play.png new file mode 100644 index 000000000..a1e81744d Binary files /dev/null and b/hide_menu_user/static/description/assets/play.png differ diff --git a/hide_menu_user/static/description/assets/screenshots/1.png b/hide_menu_user/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..186a293ea Binary files /dev/null and b/hide_menu_user/static/description/assets/screenshots/1.png differ diff --git a/hide_menu_user/static/description/assets/screenshots/2.png b/hide_menu_user/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..16f54eeee Binary files /dev/null and b/hide_menu_user/static/description/assets/screenshots/2.png differ diff --git a/hide_menu_user/static/description/assets/screenshots/3.png b/hide_menu_user/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..681a93418 Binary files /dev/null and b/hide_menu_user/static/description/assets/screenshots/3.png differ diff --git a/hide_menu_user/static/description/assets/screenshots/4.png b/hide_menu_user/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..77e78fccc Binary files /dev/null and b/hide_menu_user/static/description/assets/screenshots/4.png differ diff --git a/hide_menu_user/static/description/assets/scrn1.png b/hide_menu_user/static/description/assets/scrn1.png new file mode 100644 index 000000000..7cde02683 Binary files /dev/null and b/hide_menu_user/static/description/assets/scrn1.png differ diff --git a/hide_menu_user/static/description/assets/setting.png b/hide_menu_user/static/description/assets/setting.png new file mode 100644 index 000000000..9783660e9 Binary files /dev/null and b/hide_menu_user/static/description/assets/setting.png differ diff --git a/hide_menu_user/static/description/assets/support.png b/hide_menu_user/static/description/assets/support.png new file mode 100644 index 000000000..af2f02f74 Binary files /dev/null and b/hide_menu_user/static/description/assets/support.png differ diff --git a/hide_menu_user/static/description/assets/temp.jpg b/hide_menu_user/static/description/assets/temp.jpg new file mode 100644 index 000000000..a8acf7fdf Binary files /dev/null and b/hide_menu_user/static/description/assets/temp.jpg differ diff --git a/hide_menu_user/static/description/assets/tick.png b/hide_menu_user/static/description/assets/tick.png new file mode 100644 index 000000000..57201798c Binary files /dev/null and b/hide_menu_user/static/description/assets/tick.png differ diff --git a/hide_menu_user/static/description/assets/tms.png b/hide_menu_user/static/description/assets/tms.png new file mode 100644 index 000000000..f87428ec5 Binary files /dev/null and b/hide_menu_user/static/description/assets/tms.png differ diff --git a/hide_menu_user/static/description/assets/transfer.png b/hide_menu_user/static/description/assets/transfer.png new file mode 100644 index 000000000..da60e0729 Binary files /dev/null and b/hide_menu_user/static/description/assets/transfer.png differ diff --git a/hide_menu_user/static/description/assets/whatsapp.png b/hide_menu_user/static/description/assets/whatsapp.png new file mode 100644 index 000000000..989a8fd8b Binary files /dev/null and b/hide_menu_user/static/description/assets/whatsapp.png differ diff --git a/hide_menu_user/static/description/banner.jpg b/hide_menu_user/static/description/banner.jpg new file mode 100644 index 000000000..6b6429344 Binary files /dev/null and b/hide_menu_user/static/description/banner.jpg differ diff --git a/hide_menu_user/static/description/icon.png b/hide_menu_user/static/description/icon.png new file mode 100644 index 000000000..2c921a8e3 Binary files /dev/null and b/hide_menu_user/static/description/icon.png differ diff --git a/hide_menu_user/static/description/index.html b/hide_menu_user/static/description/index.html new file mode 100644 index 000000000..5b484b7c5 --- /dev/null +++ b/hide_menu_user/static/description/index.html @@ -0,0 +1,814 @@ + + + + + + + app index + + + + + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+
+
+ Supports: +
+ Community +
+
+
+
+
+ Availability: +
+ + + Odoo Online +
+
+ + + Odoo.sh +
+
+ + + On Premise +
+
+
+
+
+
+
+ + +
+
+
+

+ Hide Any Menu User Wise

+

This Module Helps To Hide any Menu items user wise.

+ + + +
+
+
+ + +
+
+
+ +
+
+ +
+

+ Read Blog

+

Dive into our + comprehensive blog posts covering the latest in + cybersecurity + trends and insights.

+ + + + Copy Link + +
+
+
+ +
+
+ +
+

+ Video Tutorial

+

Watch our detailed + video demonstrations and tutorials on YouTube + for + hands-on learning.

+ + + Watch Demo + +
+
+
+
+ +
+
+ +

Key + Highlights +

+ +
+
+
+ +
+ +
+

+ Compatible

+

Available in Odoo 19.0 Community and Enterprise. +

+ +
+
+
+
+ +
+ +
+

+ Easiness

+

Streamlined + Easily hide any menu/submenu items user-wise. +

+ +
+
+
+
+
+ +
+
+ +
+
+
+ + +

+ Sale Order Menu

+
+ Before adding the hide menu option you can see the Specific Menu. +
+ +
+ +
+ +

Create New Hide Specific Menu

+
+ Go to Settings > Users and there you can see the 'Hide Specific Menu' tab where you can select any Menu/Submenu that needs to be hidden to the selected user. +
+ +
+ +
+ + + + +

Select Menu +

+
+ Click on 'Add a line' and select the menus that needs to be hidden for this user. +
+ +
+ +
+ +

+

+
+ As you can see the menus and corresponding views are now hidden for the user. + +
+ +
+ +
+ +
+
+
+
+ +

Our + Features +

+
+ +
+
+
01
+

Available in Odoo 19.0 Community and Enterprise

+ +
+
+
+
+
02
+

Easily hide any menu/submenu items user-wise.

+ +
+
+
+
+
+
+
+ +

+ Frequently Asked Questions

+ +
+
+
+

+ +

+
+
+

Yes, you can. When you hide a menu for a user, the system automatically updates the restricted user list for that menu. You can hide the same menu for multiple users by selecting it in each user's form.

+
+
+
+ +
+

+ +

+
+
+

No, by default, admin users will still have access to all menus. There is a feature that checks if a user is an admin, and the "Hidden Menu" field will not be available for admins. .

+ +
+
+
+ +
+

+ +

+
+
+

Yes, you can hide both submenus and parent menus. However, you need to manually select each menu (parent or child) that you want to hide.

+
+
+
+
+
+
+
+
+
+

+ Latest Releases

+
+
+
+
+
Latest Release 19.0.1.0.0
+
Add
+
+ + 19th September, 2025 +
+
+
+
+ +
Initial Commit
+
+
+
+
+
+
+
+
+ +
+ + + +
+ + + + + +
+
+ +

Our + Services +

+ +
+ +
+
+ +
+ +
+

+ Odoo Customization

+ + +
+
+ +
+
+ +
+ +
+

+ Odoo Implementation

+ + +
+
+ +
+
+ +
+ +
+

+ Odoo Support

+ + +
+
+ +
+
+ +
+ +
+

+ Odoo Migration

+ + +
+
+ +
+
+ +
+ +
+

+ Odoo integration

+ + +
+
+ +
+
+ +
+ +
+

+ Odoo Consultancy

+ + +
+
+ + +
+
+ +
+ +
+

+ Odoo Licensing

+ + +
+
+ +
+
+ +
+ +
+

+ Hire Odoo Developer

+ + +
+
+ + +
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/hide_menu_user/views/ir_ui_menu_views.xml b/hide_menu_user/views/ir_ui_menu_views.xml new file mode 100644 index 000000000..f386aae99 --- /dev/null +++ b/hide_menu_user/views/ir_ui_menu_views.xml @@ -0,0 +1,18 @@ + + + + + ir.ui.menu.view.form.inherit.hide.menu.user + ir.ui.menu + + + + + + + + + + + + diff --git a/hide_menu_user/views/res_users_views.xml b/hide_menu_user/views/res_users_views.xml new file mode 100644 index 000000000..afa996a22 --- /dev/null +++ b/hide_menu_user/views/res_users_views.xml @@ -0,0 +1,18 @@ + + + + + res.users.view.form.inherit.hide.menu.user + res.users + + + + + + + + + + + +