mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-25 22:32:06 +02:00
Initial commit: Hr packages
This commit is contained in:
commit
62531cd146
2820 changed files with 1432848 additions and 0 deletions
15
odoo-bringout-oca-ocb-hr/hr/models/ir_ui_menu.py
Normal file
15
odoo-bringout-oca-ocb-hr/hr/models/ir_ui_menu.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, api, tools
|
||||
|
||||
|
||||
class IrUiMenu(models.Model):
|
||||
_inherit = 'ir.ui.menu'
|
||||
|
||||
def _load_menus_blacklist(self):
|
||||
res = super()._load_menus_blacklist()
|
||||
emp_menu = self.env.ref('hr.menu_hr_employee', raise_if_not_found=False)
|
||||
if emp_menu and self.env.user.has_group('hr.group_hr_user'):
|
||||
res.append(emp_menu.id)
|
||||
return res
|
||||
Loading…
Add table
Add a link
Reference in a new issue