ir_ui_menu.py 462 B

123456789101112131415
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. from odoo import models
  4. class IrUiMenu(models.Model):
  5. _inherit = 'ir.ui.menu'
  6. def _load_menus_blacklist(self):
  7. res = super()._load_menus_blacklist()
  8. if self.env.user.has_group('hr_attendance.group_hr_attendance_user'):
  9. res.append(self.env.ref('hr_attendance.menu_hr_attendance_attendances_overview').id)
  10. return res