Browse Source

Sep 1 : [ADD] Initial Commit 'hide_menu_user'

19.0
AjmalCybro 4 days ago
parent
commit
b8027856c9
  1. 53
      hide_menu_user/README.rst
  2. 22
      hide_menu_user/__init__.py
  3. 46
      hide_menu_user/__manifest__.py
  4. 7
      hide_menu_user/doc/RELEASE_NOTES.md
  5. 23
      hide_menu_user/models/__init__.py
  6. 46
      hide_menu_user/models/ir_ui_menu.py
  7. 66
      hide_menu_user/models/res_users.py
  8. BIN
      hide_menu_user/static/description/assets/calendar.png
  9. BIN
      hide_menu_user/static/description/assets/chart.png
  10. BIN
      hide_menu_user/static/description/assets/chat.png
  11. BIN
      hide_menu_user/static/description/assets/close.png
  12. BIN
      hide_menu_user/static/description/assets/copy.png
  13. BIN
      hide_menu_user/static/description/assets/document.png
  14. BIN
      hide_menu_user/static/description/assets/idea.png
  15. BIN
      hide_menu_user/static/description/assets/imple.png
  16. BIN
      hide_menu_user/static/description/assets/mail.png
  17. BIN
      hide_menu_user/static/description/assets/people.png
  18. BIN
      hide_menu_user/static/description/assets/play.png
  19. BIN
      hide_menu_user/static/description/assets/screenshots/1.png
  20. BIN
      hide_menu_user/static/description/assets/screenshots/2.png
  21. BIN
      hide_menu_user/static/description/assets/screenshots/3.png
  22. BIN
      hide_menu_user/static/description/assets/screenshots/4.png
  23. BIN
      hide_menu_user/static/description/assets/scrn1.png
  24. BIN
      hide_menu_user/static/description/assets/setting.png
  25. BIN
      hide_menu_user/static/description/assets/support.png
  26. BIN
      hide_menu_user/static/description/assets/temp.jpg
  27. BIN
      hide_menu_user/static/description/assets/tick.png
  28. BIN
      hide_menu_user/static/description/assets/tms.png
  29. BIN
      hide_menu_user/static/description/assets/transfer.png
  30. BIN
      hide_menu_user/static/description/assets/whatsapp.png
  31. BIN
      hide_menu_user/static/description/banner.jpg
  32. BIN
      hide_menu_user/static/description/icon.png
  33. 814
      hide_menu_user/static/description/index.html
  34. 18
      hide_menu_user/views/ir_ui_menu_views.xml
  35. 18
      hide_menu_user/views/res_users_views.xml

53
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 <https://cybrosys.com/>`__
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 <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

22
hide_menu_user/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models

46
hide_menu_user/__manifest__.py

@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'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,
}

7
hide_menu_user/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <hide_menu_user>
#### 19.09.2025
#### Version 19.0.1.0.0
#### ADD
- Initial commit for Hide Any Menu User Wise

23
hide_menu_user/models/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import ir_ui_menu
from . import res_users

46
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(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
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)

66
hide_menu_user/models/res_users.py

@ -0,0 +1,66 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
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

BIN
hide_menu_user/static/description/assets/calendar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
hide_menu_user/static/description/assets/chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
hide_menu_user/static/description/assets/chat.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
hide_menu_user/static/description/assets/close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
hide_menu_user/static/description/assets/copy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
hide_menu_user/static/description/assets/document.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
hide_menu_user/static/description/assets/idea.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
hide_menu_user/static/description/assets/imple.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
hide_menu_user/static/description/assets/mail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
hide_menu_user/static/description/assets/people.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
hide_menu_user/static/description/assets/play.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
hide_menu_user/static/description/assets/screenshots/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

BIN
hide_menu_user/static/description/assets/screenshots/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
hide_menu_user/static/description/assets/screenshots/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
hide_menu_user/static/description/assets/screenshots/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

BIN
hide_menu_user/static/description/assets/scrn1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

BIN
hide_menu_user/static/description/assets/setting.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
hide_menu_user/static/description/assets/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
hide_menu_user/static/description/assets/temp.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

BIN
hide_menu_user/static/description/assets/tick.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
hide_menu_user/static/description/assets/tms.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
hide_menu_user/static/description/assets/transfer.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
hide_menu_user/static/description/assets/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
hide_menu_user/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 KiB

BIN
hide_menu_user/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

814
hide_menu_user/static/description/index.html

@ -0,0 +1,814 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>app index</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap"
rel="stylesheet" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css" />
</head>
<body style="font-family: &quot;Montserrat&quot;, sans-serif;background-color: #71639e08;">
<div class="container-fluid cmpad">
<div class="supports my-3 py-3" style=" border: 2px solid #71639e10;
padding: 0 35px;
border-radius: 10px; border: 2px solid #e9ecef;background-color: white;">
<div class="row justify-content-between align-items-center">
<div class="col-lg-3">
<div class="my-3 mx-auto mx-sm-0" style="width: 250px; ">
<img src="//apps.odoocdn.com/apps/assets/17.0/theme_boec/images/Cybrosys.png?fcdde35"
style="width: 100%;">
</div>
</div>
<div class="col-lg-9">
<div class="row">
<div class="my-3 d-flex align-items-center justify-content-center justify-content-sm-end">
<span class="me-3"><b>Supports: </b></span>
<div class="text-center" style="
background-color: #71639e !important;
font-size: 1rem !important;
color: #fff !important;
font-weight: 500 !important;
padding: 8px !important;
margin: 0 3px !important;
border-radius: 50px !important;
min-width: 130px !important;
">
Community
</div>
</div>
</div>
<div class="row" style="margin-top: 10px;display: flex;justify-content: end;float: right;">
<div class="d-flex align-items-center justify-content-end flex-wrap gap-2">
<span class="me-3"><b>Availability: </b></span>
<div class="d-flex align-items-center justify-content-center gap-2 text-center col" style="
border: 2px solid #ebebeb;
font-size: 1rem !important;
color: #333 !important;
font-weight: 500 !important;
padding: 8px !important;
margin: 0 3px !important;
border-radius: 20px !important;
min-width: 150px !important;
">
<img src="./assets/close.png" alt="" width="18" height="18">
Odoo Online
</div>
<div class="d-flex align-items-center justify-content-center gap-2 text-center col" style="
border: 2px solid #ebebeb;
font-size: 1rem !important;
color: #333 !important;
font-weight: 500 !important;
padding: 8px !important;
margin: 0 3px !important;
border-radius: 20px !important;
min-width: 150px !important;
">
<img src="./assets/tick.png" alt="" width="18" height="18">
Odoo.sh
</div>
<div class="d-flex align-items-center justify-content-center gap-2 text-center col" style="
border: 2px solid #ebebeb;
font-size: 1rem !important;
color: #333 !important;
font-weight: 500 !important;
padding: 8px !important;
margin: 0 3px !important;
border-radius: 20px !important;
min-width: 150px !important;
">
<img src="./assets/tick.png" alt="" width="18" height="18">
On Premise
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid cmpad text-center py-5 py-md-3">
<div class="row">
<div class="col-md-12">
<h3 class="mainhead" style="font-size: 2.3rem;padding-top: 1rem;font-weight: 700;color: black;">
Hide Any Menu User Wise</h3>
<p class="para mb-4" style="font-size: 20px;color: #6b7280;">This Module Helps To Hide any Menu items user wise.</p>
<div class="d-flex justify-content-center gap-1 flex-wrap">
<a href="mailto:"
class="contact-btn email-btn d-flex align-items-center gap-2 justify-content-center"
style="position: relative;padding: 15px 25px;border: none;border-radius: 50px;font-size: 16px;font-weight: 600;text-decoration: none;color: white;cursor: pointer;min-width: 200px;justify-content: center;background-color: #4facfe">
<img src="./assets/mail.png" alt="" width="25" height="25">
<span class="btn-text" style="font-size: 15px;letter-spacing: 0.5px;">Email Us</span>
</a>
<a href="skype:"
class="contact-btn skype-btn d-flex align-items-center gap-2 justify-content-center"
style="position: relative;padding: 15px 25px;border: none;border-radius: 50px;font-size: 16px;font-weight: 600;text-decoration: none;color: white;cursor: pointer;min-width: 200px;justify-content: center;background-color: #555ecb">
<img src="./assets/tms.png" alt="" width="30" height="30">
<span class="btn-text" style="font-size: 15px;letter-spacing: 0.5px;">Teams</span>
</a>
<a href="https://wa.me/919074270811"
class="contact-btn whatsapp-btn d-flex align-items-center gap-2 justify-content-center"
style="position: relative;padding: 15px 25px;border: none;border-radius: 50px;font-size: 16px;font-weight: 600;text-decoration: none;color: white;cursor: pointer;min-width: 200px;justify-content: center;background-color: #25d366;">
<img src="./assets/whatsapp.png" alt="" width="25" height="25">
<span class="btn-text" style="font-size: 15px;letter-spacing: 0.5px;">+91 9074270811</span>
</a>
</div>
</div>
</div>
</div>
<div class="container-fluid cmpad py-2 py-md-5">
<div class="row">
<div class="col-md-6 mb-3 mb-md-0">
<!-- Blog Card -->
<div class="content-card blog-card h-100" style=" background-color: #8b5cf612;
border: 2px solid #8a5cf615;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #8B5CF6;">
<img src="./assets/document.png" alt="" width="30" height="30">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;margin-bottom: 12px;letter-spacing: -0.025em;">
Read Blog</h3>
<p class="card-description mb-3"
style="font-size: 16px;color: #6b7280;margin-bottom: 0;line-height: 1.6;">Dive into our
comprehensive blog posts covering the latest in
cybersecurity
trends and insights.</p>
<a href="https://www.cybrosys.com/blog/how-to-hide-specific-menus-for-individual-users-in-odoo-18"
class="card-action video-action d-flex align-items-center justify-content-center gap-2"
style="padding: 10px 20px;border-radius: 8px;font-weight: 500;font-size: 15px;text-decoration: none;border: none;width: max-content;background-color: #9e6390;color: white;transition: .3s;">
<img src="./assets/copy.png" alt="" width="18" height="18">
Copy Link
</a>
</div>
</div>
<div class="col-md-6">
<!-- Video Card -->
<div class="content-card video-card h-100" style=" background-color: #ef444421;
border: 2px solid #ef44441f;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #EF4444;">
<img src="./assets/play.png" alt="" width="23px" height="23px">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;margin-bottom: 12px;letter-spacing: -0.025em;">
Video Tutorial</h3>
<p class="card-description mb-3"
style="font-size: 16px;color: #6b7280;margin-bottom: 0;line-height: 1.6;">Watch our detailed
video demonstrations and tutorials on YouTube
for
hands-on learning.</p>
<a href="https://www.youtube.com/watch?v=gE4jemqH8dw&feature=youtu.be" class="card-action video-action d-flex align-items-center justify-content-center gap-2"
style="padding: 10px 20px;border-radius: 8px;font-weight: 500;font-size: 15px;text-decoration: none;border: none;width: max-content;background-color: #9e6390;color: white;transition: .3s;">
<img src="./assets/play.png" alt="" width="15px" height="15px">
Watch Demo
</a>
</div>
</div>
</div>
</div>
<div class="container-fluid cmpad py-2 py-md-5">
<div class="highlights-section">
<h2 class="mainhead text-center" style="font-size: 2rem;font-weight: 700;color: black;">Key
<span>Highlights</span>
</h2>
<div class="row" style="margin-top: 20px;">
<div class="col-md-4 mb-4">
<div class="highlight-card h-100" style="background-color: #8d76d51f;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
border: 2px solid #71639e1a;
position: relative;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #71639e;">
<img src="./assets/chart.png" alt="" width="30" height="30">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;margin-bottom: 12px;letter-spacing: -0.025em;">
Compatible</h3>
<p class="card-description"
style="font-size: 16px;color: #6b7280;margin-bottom: 0;line-height: 1.6;">Available in Odoo 19.0 Community and Enterprise.
</p>
</div>
</div>
<div class="col-md-4 mb-4">
<div class="highlight-card h-100" style="background-color: #8d76d51f;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
border: 2px solid #71639e1a;
position: relative;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #71639e;">
<img src="./assets/chart.png" alt="" width="30" height="30">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;margin-bottom: 12px;letter-spacing: -0.025em;">
Easiness</h3>
<p class="card-description"
style="font-size: 16px;color: #6b7280;margin-bottom: 0;line-height: 1.6;">Streamlined
Easily hide any menu/submenu items user-wise.
</p>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid cmpad py-2 py-md-5">
<div class="tabs-design1">
<ul class="nav nav-pills justify-content-start justify-content-md-center pb-4" style=" flex-flow: nowrap;
overflow: hidden;
overflow-x: auto;" id="pills1" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active" id="screenshot-tab" data-bs-toggle="pill" data-bs-target="#screenshot"
type="button" role="tab" style="width: max-content;border-radius: 50px;
margin: 0 5px;
padding: 12px 24px;
font-weight: 500;
border: 2px solid #e9ecef;
position: relative;
">
Screenshot
</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="features-tab" data-bs-toggle="pill" data-bs-target="#features" type="button"
role="tab" style="width: max-content;border-radius: 50px;
margin: 0 5px;
padding: 12px 24px;
font-weight: 500;
border: 2px solid #e9ecef;
position: relative;
">
Features
</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="faq-tab" data-bs-toggle="pill" data-bs-target="#faq" type="button"
role="tab" style="width: max-content;border-radius: 50px;
margin: 0 5px;
padding: 12px 24px;
font-weight: 500;
border: 2px solid #e9ecef;
position: relative;
">
Frequent Questions
</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="latest-release-tab" data-bs-toggle="pill" data-bs-target="#latest-release"
type="button" role="tab" style="width: max-content;border-radius: 50px;
margin: 0 5px;
padding: 12px 24px;
font-weight: 500;
border: 2px solid #e9ecef;
position: relative;
">
Latest Release
</a>
</li>
</ul>
<div class="tab-content bg-white rounded-4" style="border: 2px solid #e9ecef;border-radius: 10px;"
id="pills1Content">
<div class="tab-pane fade show active" id="screenshot" role="tabpane2">
<div class="p-3 py-md-5">
<h2 class="mainhead text-center mb-2" style="font-size: 2rem;font-weight: 700;color: black;">
Sale <span> Order Menu</span></h2>
<div class="para"
style="max-width: 80%;text-align: center;margin: auto;font-size: 18px;margin-bottom: 2rem;color: #6b7280;">
Before adding the hide menu option you can see the Specific Menu.
</div>
<div style="border-radius: 10px;
overflow: hidden;
border: 2px solid #e7e7e7;">
<img src="./assets/screenshots/1.png" alt="" style="max-width: 100%;height: auto;">
</div>
<h2 class="mainhead text-center mb-2 mt-5"
style="font-size: 2rem;font-weight: 700;color: black;">Create New <span> Hide Specific Menu</span></h2>
<div class="para"
style="max-width: 80%;text-align: center;margin: auto;font-size: 18px;margin-bottom: 2rem;color: #6b7280;">
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.
</div>
<div style="border-radius: 10px;
overflow: hidden;
border: 2px solid #e7e7e7;">
<img src="./assets/screenshots/2.png" alt="" style="max-width: 100%;height: auto;">
</div>
<h2 class="mainhead text-center mb-2 mt-5"
style="font-size: 2rem;font-weight: 700;color: black;"><span>Select Menu</span>
</h2>
<div class="para"
style="max-width: 80%;text-align: center;margin: auto;font-size: 18px;margin-bottom: 2rem;color: #6b7280;">
Click on 'Add a line' and select the menus that needs to be hidden for this user.
</div>
<div style="border-radius: 10px;
overflow: hidden;
border: 2px solid #e7e7e7;">
<img src="./assets/screenshots/3.png" alt="" style="max-width: 100%;height: auto;">
</div>
<h2 class="mainhead text-center mb-2 mt-5"
style="font-size: 2rem;font-weight: 700;color: black;"><span></span>
</h2>
<div class="para"
style="max-width: 80%;text-align: center;margin: auto;font-size: 18px;margin-bottom: 2rem;color: #6b7280;">
As you can see the menus and corresponding views are now hidden for the user.
</div>
<div style="border-radius: 10px;
overflow: hidden;
border: 2px solid #e7e7e7;">
<img src="./assets/screenshots/4.png" alt="" style="max-width: 100%;height: auto;">
</div>
</div>
</div>
<div class="tab-pane fade" id="features" role="tabpanel">
<div class="p-3 py-md-5">
<h2 class="mainhead text-center mb-4" style="font-size: 2rem;font-weight: 700;color: black;">Our
<span>Features</span>
</h2>
<div class="row" style="
border-radius: 10px;">
<div class="col-md-4">
<div class="feature-item mb-4 d-flex flex-column align-items-center justify-content-center"
style="
padding: 25px;
background-color: #637eea0d;
border-radius: 10px;
text-align: left;">
<div class="feature-number d-flex align-items-center justify-content-center" style=" width: 45px;
height: 45px;
background-color: #7877c633;
border-radius: 50%;
font-size: 1.2rem;
font-weight: 600;
color: #71639e;
margin-bottom: 15px;
">01</div>
<h3 class="feature-title" style="font-size: 1.2rem;
font-weight: 600;
margin-bottom: 0;
color: black;
line-height: 1.3;">Available in Odoo 19.0 Community and Enterprise</h3>
</div>
</div>
<div class="col-md-4">
<div class="feature-item mb-4 d-flex flex-column align-items-center justify-content-center"
style="
padding: 25px;
background-color: #637eea0d;
border-radius: 10px;
text-align: left;">
<div class="feature-number d-flex align-items-center justify-content-center" style=" width: 45px;
height: 45px;
background-color: #7877c633;
border-radius: 50%;
font-size: 1.2rem;
font-weight: 600;
color: #71639e;
margin-bottom: 15px;
">02</div>
<h3 class="feature-title" style="font-size: 1.2rem;
font-weight: 600;
margin-bottom: 0;
color: black;
line-height: 1.3;">Easily hide any menu/submenu items user-wise.</h3>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="faq" role="tabpane2 ">
<div class="p-3 py-md-5">
<h2 class="mainhead text-center mb-4" style="font-size: 2rem;font-weight: 700;color: black;">
Frequently Asked <span>Questions</span></h2>
<div class="modern-accordion">
<div class="accordion accordion-flush" id="accordionFlushExample">
<div class="accordion-item loading-animation"
style="margin-bottom: 1rem;overflow: hidden;background-color: white;border: 2px solid #e2e8f0 !important;border-radius: 10px !important;">
<h2 class="accordion-header" style="border-radius: 10px;">
<a class="accordion-button collapsed" type="button" style="box-shadow: unset;
border: none !important;
padding: 1.5rem 2rem !important;
font-weight: 600 !important;
font-size: 1.1rem;
color: #71639e !important;
background-color: #e3e3f3a9 !important;
position: relative;
overflow: hidden;" data-bs-toggle="collapse" data-bs-target="#flush-collapseOne" aria-expanded="false"
aria-controls="flush-collapseOne"
style="font-size: 1.1rem;position: relative;overflow: hidden;background-color: white !important;border: none !important;padding: 1.5rem 2rem !important;font-weight: 600 !important;color: #1e293b !important;border-radius: 10px !important;">
Can I restrict multiple users from seeing a menu item at the same time?
</a>
</h2>
<div id="flush-collapseOne" class="accordion-collapse collapse"
data-bs-parent="#accordionFlushExample" style="border-top: 1px solid #e2e8f0;">
<div class="accordion-body"
style="background-color: rgba(99, 102, 241, 0.02);line-height: 1.6;font-size: 1rem;padding: 2rem !important;">
<p style="margin-bottom: 1rem;">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.</p>
</div>
</div>
</div>
<div class="accordion-item loading-animation"
style="margin-bottom: 1rem;overflow: hidden;background-color: white;border: 2px solid #e2e8f0 !important;border-radius: 10px !important;">
<h2 class="accordion-header" style="border-radius: 10px;">
<a class="accordion-button collapsed" type="button" style="box-shadow: unset;
border: none !important;
padding: 1.5rem 2rem !important;
font-weight: 600 !important;
font-size: 1.1rem;
color: #71639e !important;
background-color: #e3e3f3a9 !important;
position: relative;
overflow: hidden;" data-bs-toggle="collapse" data-bs-target="#flush-collapseTwo" aria-expanded="false"
aria-controls="flush-collapseTwo"
style="font-size: 1.1rem;position: relative;overflow: hidden;background-color: white !important;border: none !important;padding: 1.5rem 2rem !important;font-weight: 600 !important;color: #1e293b !important;border-radius: 10px !important;">
Does this module also work for admin users?
</a>
</h2>
<div id="flush-collapseTwo" class="accordion-collapse collapse"
data-bs-parent="#accordionFlushExample" style="border-top: 1px solid #e2e8f0;">
<div class="accordion-body"
style="background-color: rgba(99, 102, 241, 0.02);line-height: 1.6;font-size: 1rem;padding: 2rem !important;">
<p style="margin-bottom: 1rem;">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. .</p>
</div>
</div>
</div>
<div class="accordion-item loading-animation"
style="margin-bottom: 0;overflow: hidden;background-color: white;border: 2px solid #e2e8f0 !important;border-radius: 10px !important;">
<h2 class="accordion-header" style="border-radius: 10px;">
<a class="accordion-button collapsed" type="button" style="box-shadow: unset;
border: none !important;
padding: 1.5rem 2rem !important;
font-weight: 600 !important;
font-size: 1.1rem;
color: #71639e !important;
background-color: #e3e3f3a9 !important;
position: relative;
overflow: hidden;" data-bs-toggle="collapse" data-bs-target="#flush-collapseThree" aria-expanded="false"
aria-controls="flush-collapseThree"
style="font-size: 1.1rem;position: relative;overflow: hidden;background-color: white !important;border: none !important;padding: 1.5rem 2rem !important;font-weight: 600 !important;color: #1e293b !important;border-radius: 10px !important;">
Can I hide submenus and their parent menus?
</a>
</h2>
<div id="flush-collapseThree" class="accordion-collapse collapse"
data-bs-parent="#accordionFlushExample" style="border-top: 1px solid #e2e8f0;">
<div class="accordion-body"
style="background-color: rgba(99, 102, 241, 0.02);line-height: 1.6;font-size: 1rem;padding: 2rem !important;">
<p style="margin-bottom: 1rem;">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.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="latest-release" role="tabpanel">
<div class="p-3 py-md-5">
<h2 class="mainhead text-center mb-4" style="font-size: 2rem;font-weight: 700;color: black;">
Latest <span>Releases</span></h2>
<div class="row">
<div class="col-md-4 mb-4">
<div class="release-item h-100" style=" position: relative;
padding: 30px;
border: 2px solid #71639e24;
border-radius: 15px;">
<div class="release-header d-flex align-items-center flex-wrap gap-3" style="
margin-bottom: 0.75rem;
">
<div class="version" style="font-size: 1.25rem;
font-weight: 700;
color: #1a202c;">Latest Release 19.0.1.0.0</div>
<div style="padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
position: relative;
overflow: hidden; background-color: #9ae6b4;
color: #2d7d32;
border: 2px solid #68d391;" class=" add">Add</div>
<div class="date" style=" color: #64748b;
font-size: 0.875rem;
font-weight: 500;
gap: 0.5rem;">
<img src="./assets/calendar.png" alt="" width="16" height="16"
style="margin-right: 5px;">
19th September, 2025
</div>
</div>
<div class="feature-list">
<div class="feature-item p-3" style="border-radius: 5px; display: flex;
align-items: center;
padding: 25px;
background-color: #f5f5f5e7;
border-radius: 10px;
text-align: left;">
<div class="feature-text" style="color: #6b7280;
line-height: 1.6;
font-size: 0.95rem;">Initial Commit</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid cmpad py-2 py-md-5">
<div class="highlights-section">
<h2 class="mainhead text-center" style="font-size: 2rem;font-weight: 700;color: black;">Our
<span>Services</span>
</h2>
<div class="row">
<div class="col-md-3 mb-4">
<div class="highlight-card h-100 high d-flex flex-column justify-content-center align-items-center text-center"
style="background-color: #8d76d51f;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
border: 2px solid #71639e1a;
position: relative;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #71639e;">
<img src="./assets/setting.png" alt="" width="30" height="30">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;letter-spacing: -0.025em;">
Odoo Customization</h3>
</div>
</div>
<div class="col-md-3 mb-4">
<div class="highlight-card h-100 high d-flex flex-column justify-content-center align-items-center text-center"
style="background-color: #8d76d51f;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
border: 2px solid #71639e1a;
position: relative;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #71639e;">
<img src="./assets/imple.png" alt="" width="30" height="30">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;letter-spacing: -0.025em;">
Odoo Implementation</h3>
</div>
</div>
<div class="col-md-3 mb-4">
<div class="highlight-card h-100 high d-flex flex-column justify-content-center align-items-center text-center"
style="background-color: #8d76d51f;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
border: 2px solid #71639e1a;
position: relative;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #71639e;">
<img src="./assets/support.png" alt="" width="30" height="30">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;letter-spacing: -0.025em;">
Odoo Support</h3>
</div>
</div>
<div class="col-md-3 mb-4">
<div class="highlight-card h-100 high d-flex flex-column justify-content-center align-items-center text-center"
style="background-color: #8d76d51f;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
border: 2px solid #71639e1a;
position: relative;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #71639e;">
<img src="./assets/transfer.png" alt="" width="30" height="30">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;letter-spacing: -0.025em;">
Odoo Migration</h3>
</div>
</div>
<div class="col-md-3 mb-4">
<div class="highlight-card h-100 high d-flex flex-column justify-content-center align-items-center text-center"
style="background-color: #8d76d51f;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
border: 2px solid #71639e1a;
position: relative;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #71639e;">
<img src="./assets/idea.png" alt="" width="30" height="30">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;letter-spacing: -0.025em;">
Odoo integration</h3>
</div>
</div>
<div class="col-md-3 mb-4">
<div class="highlight-card h-100 high d-flex flex-column justify-content-center align-items-center text-center"
style="background-color: #8d76d51f;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
border: 2px solid #71639e1a;
position: relative;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #71639e;">
<img src="./assets/chat.png" alt="" width="30" height="30">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;letter-spacing: -0.025em;">
Odoo Consultancy</h3>
</div>
</div>
<div class="col-md-3 mb-4">
<div class="highlight-card h-100 high d-flex flex-column justify-content-center align-items-center text-center"
style="background-color: #8d76d51f;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
border: 2px solid #71639e1a;
position: relative;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #71639e;">
<img src="./assets/chart.png" alt="" width="30" height="30">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;letter-spacing: -0.025em;">
Odoo Licensing</h3>
</div>
</div>
<div class="col-md-3 mb-4">
<div class="highlight-card h-100 high d-flex flex-column justify-content-center align-items-center text-center"
style="background-color: #8d76d51f;
backdrop-filter: blur(20px);
border-radius: 10px;
padding: 32px;
border: 2px solid #71639e1a;
position: relative;
overflow: hidden;">
<div class="card-icon d-flex align-items-center justify-content-center gap-2"
style="width: 60px;height: 60px;border-radius: 10px;margin-bottom: 24px;position: relative;overflow: hidden;background-color: #71639e;">
<img src="./assets/people.png" alt="" width="30" height="30">
</div>
<h3 class="card-title"
style="font-size: 20px;font-weight: 600;color: black;letter-spacing: -0.025em;">
Hire Odoo Developer</h3>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>
</html>

18
hide_menu_user/views/ir_ui_menu_views.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!--Inherited view of the model ir.ui.menu-->
<record id="edit_menu_access" model="ir.ui.view">
<field name="name">ir.ui.menu.view.form.inherit.hide.menu.user</field>
<field name="model">ir.ui.menu</field>
<field name="inherit_id" ref="base.edit_menu_access"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="Restrict users" name="restrict_users">
<list>
<field name="restrict_user_ids"/>
</list>
</page>
</xpath>
</field>
</record>
</odoo>

18
hide_menu_user/views/res_users_views.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!--Inheriting fields to res.users-->
<record id="view_users_form" model="ir.ui.view">
<field name="name">res.users.view.form.inherit.hide.menu.user</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="Hide Specific Menu" invisible="role == 'group_system' or is_show_specific_menu">
<list>
<field name="hide_menu_ids"/>
</list>
</page>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save