| 1 |
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 2 |
|
| 3 |
from odoo import models |
| 4 |
|
| 5 |
|
| 6 |
class IrUiMenu(models.Model): |
| 7 |
_inherit = 'ir.ui.menu' |
| 8 |
|
| 9 |
def _load_menus_blacklist(self): |
| 10 |
res = super()._load_menus_blacklist() |
| 11 |
if not ( |
| 12 |
self.env.user.has_group('hr_attendance.group_hr_attendance_manager') and |
| 13 |
self.env.user.has_group('hr_holidays.group_hr_holidays_user') |
| 14 |
): |
| 15 |
res.append(self.env.ref('hr_holidays_attendance.hr_leave_attendance_report').id) |
| 16 |
return res |