diff --git a/hide_menu_user/README.rst b/hide_menu_user/README.rst new file mode 100644 index 000000000..3df5b3894 --- /dev/null +++ b/hide_menu_user/README.rst @@ -0,0 +1,43 @@ +Hide Any Menu User Wise +======================= +* Hide Any Menu User Wise + +Installation +============ + - www.odoo.com/documentation/15.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/15.0/legal/licenses/licenses.html) + +Company +------- +* 'Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: +(v14) Sreerag @ Cybrosys +(v15) Midilaj @ Cybrosys + + +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 +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ + diff --git a/hide_menu_user/__init__.py b/hide_menu_user/__init__.py new file mode 100644 index 000000000..f2c5a4636 --- /dev/null +++ b/hide_menu_user/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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..dafabf8ea --- /dev/null +++ b/hide_menu_user/__manifest__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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': '15.0.1.0.0', + 'summary': 'Hide Any Menu Item User Wise', + 'description': 'Hide Any Menu Item User Wise, Hide Menu Items, Hide Menu', + 'category': 'Extra Tools', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base'], + 'data': [ + 'views/res_users.xml', + 'security/security.xml' + ], + 'license': 'LGPL-3', + 'images': ['static/description/banner.png'], + '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..8243a241f --- /dev/null +++ b/hide_menu_user/doc/RELEASE_NOTES.md @@ -0,0 +1,9 @@ +## Module + +#### 30.12.2021 +#### Version 15.0.1.0.0 +#### ADD +- Initial commit for hide_menu_user + + + diff --git a/hide_menu_user/models/__init__.py b/hide_menu_user/models/__init__.py new file mode 100644 index 000000000..3caa43d73 --- /dev/null +++ b/hide_menu_user/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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 res_user diff --git a/hide_menu_user/models/res_user.py b/hide_menu_user/models/res_user.py new file mode 100644 index 000000000..f70fb4f46 --- /dev/null +++ b/hide_menu_user/models/res_user.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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 models, fields, api + + +class HideMenuUser(models.Model): + _inherit = 'res.users' + + @api.model + def create(self, vals): + """ + Else the menu will be still hidden even after removing from the list + """ + self.clear_caches() + return super(HideMenuUser, self).create(vals) + + def write(self, vals): + """ + Else the menu will be still hidden even after removing from the list + """ + res = super(HideMenuUser, self).write(vals) + for menu in self.hide_menu_ids: + menu.write({ + 'restrict_user_ids': [(4, self.id)] + }) + self.clear_caches() + return res + + def _get_is_admin(self): + """ + The Hide specific menu tab will be hidden for the Admin user form. + Else once the menu is hidden, it will be difficult to re-enable it. + """ + for rec in self: + rec.is_admin = False + if rec.id == self.env.ref('base.user_admin').id: + rec.is_admin = True + + hide_menu_ids = fields.Many2many('ir.ui.menu', string="Menu", store=True, + help='Select menu items that needs to be ' + 'hidden to this user ') + is_admin = fields.Boolean(compute=_get_is_admin) + + +class RestrictMenu(models.Model): + _inherit = 'ir.ui.menu' + + restrict_user_ids = fields.Many2many('res.users') diff --git a/hide_menu_user/security/security.xml b/hide_menu_user/security/security.xml new file mode 100644 index 000000000..ad9d5ec3b --- /dev/null +++ b/hide_menu_user/security/security.xml @@ -0,0 +1,9 @@ + + + + Restrict Menu from Users + + [('restrict_user_ids','not in',user.id)] + + + \ No newline at end of file diff --git a/hide_menu_user/static/description/assets/icons/check.png b/hide_menu_user/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/check.png differ diff --git a/hide_menu_user/static/description/assets/icons/chevron.png b/hide_menu_user/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/chevron.png differ diff --git a/hide_menu_user/static/description/assets/icons/cogs.png b/hide_menu_user/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/cogs.png differ diff --git a/hide_menu_user/static/description/assets/icons/consultation.png b/hide_menu_user/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/consultation.png differ diff --git a/hide_menu_user/static/description/assets/icons/ecom-black.png b/hide_menu_user/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/ecom-black.png differ diff --git a/hide_menu_user/static/description/assets/icons/education-black.png b/hide_menu_user/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/education-black.png differ diff --git a/hide_menu_user/static/description/assets/icons/hotel-black.png b/hide_menu_user/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/hotel-black.png differ diff --git a/hide_menu_user/static/description/assets/icons/license.png b/hide_menu_user/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/license.png differ diff --git a/hide_menu_user/static/description/assets/icons/lifebuoy.png b/hide_menu_user/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/lifebuoy.png differ diff --git a/hide_menu_user/static/description/assets/icons/logo.png b/hide_menu_user/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/logo.png differ diff --git a/hide_menu_user/static/description/assets/icons/manufacturing-black.png b/hide_menu_user/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/manufacturing-black.png differ diff --git a/hide_menu_user/static/description/assets/icons/pos-black.png b/hide_menu_user/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/pos-black.png differ diff --git a/hide_menu_user/static/description/assets/icons/puzzle.png b/hide_menu_user/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/puzzle.png differ diff --git a/hide_menu_user/static/description/assets/icons/restaurant-black.png b/hide_menu_user/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/restaurant-black.png differ diff --git a/hide_menu_user/static/description/assets/icons/service-black.png b/hide_menu_user/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/service-black.png differ diff --git a/hide_menu_user/static/description/assets/icons/trading-black.png b/hide_menu_user/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/trading-black.png differ diff --git a/hide_menu_user/static/description/assets/icons/training.png b/hide_menu_user/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/training.png differ diff --git a/hide_menu_user/static/description/assets/icons/update.png b/hide_menu_user/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/update.png differ diff --git a/hide_menu_user/static/description/assets/icons/user.png b/hide_menu_user/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/user.png differ diff --git a/hide_menu_user/static/description/assets/icons/wrench.png b/hide_menu_user/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/hide_menu_user/static/description/assets/icons/wrench.png differ diff --git a/hide_menu_user/static/description/assets/modules/budget_image.png b/hide_menu_user/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/hide_menu_user/static/description/assets/modules/budget_image.png differ diff --git a/hide_menu_user/static/description/assets/modules/credit_image.png b/hide_menu_user/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/hide_menu_user/static/description/assets/modules/credit_image.png differ diff --git a/hide_menu_user/static/description/assets/modules/employee_image.png b/hide_menu_user/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/hide_menu_user/static/description/assets/modules/employee_image.png differ diff --git a/hide_menu_user/static/description/assets/modules/export_image.png b/hide_menu_user/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/hide_menu_user/static/description/assets/modules/export_image.png differ diff --git a/hide_menu_user/static/description/assets/modules/gantt_image.png b/hide_menu_user/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/hide_menu_user/static/description/assets/modules/gantt_image.png differ diff --git a/hide_menu_user/static/description/assets/modules/quotation_image.png b/hide_menu_user/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/hide_menu_user/static/description/assets/modules/quotation_image.png differ diff --git a/hide_menu_user/static/description/assets/screenshots/hero.png b/hide_menu_user/static/description/assets/screenshots/hero.png new file mode 100644 index 000000000..b292a1eff Binary files /dev/null and b/hide_menu_user/static/description/assets/screenshots/hero.png differ diff --git a/hide_menu_user/static/description/assets/screenshots/hide_menu_user1.png b/hide_menu_user/static/description/assets/screenshots/hide_menu_user1.png new file mode 100644 index 000000000..e25a1bf26 Binary files /dev/null and b/hide_menu_user/static/description/assets/screenshots/hide_menu_user1.png differ diff --git a/hide_menu_user/static/description/assets/screenshots/hide_menu_user2.png b/hide_menu_user/static/description/assets/screenshots/hide_menu_user2.png new file mode 100644 index 000000000..52a23ff4c Binary files /dev/null and b/hide_menu_user/static/description/assets/screenshots/hide_menu_user2.png differ diff --git a/hide_menu_user/static/description/assets/screenshots/hide_menu_user3.png b/hide_menu_user/static/description/assets/screenshots/hide_menu_user3.png new file mode 100644 index 000000000..c47b69778 Binary files /dev/null and b/hide_menu_user/static/description/assets/screenshots/hide_menu_user3.png differ diff --git a/hide_menu_user/static/description/assets/screenshots/hide_menu_user4.png b/hide_menu_user/static/description/assets/screenshots/hide_menu_user4.png new file mode 100644 index 000000000..68993d9f9 Binary files /dev/null and b/hide_menu_user/static/description/assets/screenshots/hide_menu_user4.png differ diff --git a/hide_menu_user/static/description/assets/screenshots/hide_menu_user5.png b/hide_menu_user/static/description/assets/screenshots/hide_menu_user5.png new file mode 100644 index 000000000..6eb568291 Binary files /dev/null and b/hide_menu_user/static/description/assets/screenshots/hide_menu_user5.png differ diff --git a/hide_menu_user/static/description/assets/screenshots/hide_menu_user6.png b/hide_menu_user/static/description/assets/screenshots/hide_menu_user6.png new file mode 100644 index 000000000..a8386904c Binary files /dev/null and b/hide_menu_user/static/description/assets/screenshots/hide_menu_user6.png differ diff --git a/hide_menu_user/static/description/banner.png b/hide_menu_user/static/description/banner.png new file mode 100644 index 000000000..6bc155887 Binary files /dev/null and b/hide_menu_user/static/description/banner.png 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..14d54d06f 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..fb6088a64 --- /dev/null +++ b/hide_menu_user/static/description/index.html @@ -0,0 +1,623 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Hide Any Menu User Wise

+

+ Hide any Menu items user wise +

+ +
+
+ + + + +
+
+

+ Overview +

+
+ +
+

+ In this module you can hide any menu item for a user. From Users click on the + 'Hide Specific Menu' tab where you can select multiple menu items that should be hidden to + that particular user.

+ +
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Community & Enterprise Support

+

+ Available in Odoo 15.0 Community and Enterprise.

+
+
+
+
+ +
+
+

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

+
+
+ +
+
+ +
+
+

+ No additional configuration needed.

+
+
+ +
+ +
+
+

+ Screenshots +

+
+
+

+ Hide Specific Menus from the User form view

+

+ 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.

+ +
+ +
+

+ Add menu to the list

+

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

+ +
+ +
+

+ Hiding the menu

+

+ Let's select these menu for this user 'Mark Demo'. +

+ +
+ +
+

+ Select the menu

+

+ Select those menus and save. +

+ +
+ +
+

+ Menus are Hidden

+

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

+ +
+ +
+

+ Option hidden for Admin user

+

+ Option to hide menu for an admin user is disabled as this may create issues in the + workflow. +

+ +
+ +
+ + +
+
+

Suggested Products

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

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/hide_menu_user/views/res_users.xml b/hide_menu_user/views/res_users.xml new file mode 100644 index 000000000..831b7f770 --- /dev/null +++ b/hide_menu_user/views/res_users.xml @@ -0,0 +1,36 @@ + + + + hide.menu + res.users + + + + + + + + + + + + + + + + + restrict.menu + ir.ui.menu + + + + + + + + + + + + + \ No newline at end of file