mirror of
https://github.com/bringout/oca-ocb-project.git
synced 2026-04-19 17:02:00 +02:00
Initial commit: Project packages
This commit is contained in:
commit
89613c97b0
753 changed files with 496325 additions and 0 deletions
17
odoo-bringout-oca-ocb-project/project/models/ir_ui_menu.py
Normal file
17
odoo-bringout-oca-ocb-project/project/models/ir_ui_menu.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class IrUiMenu(models.Model):
|
||||
_inherit = 'ir.ui.menu'
|
||||
|
||||
def _load_menus_blacklist(self):
|
||||
res = super()._load_menus_blacklist()
|
||||
if not self.env.user.has_group('project.group_project_manager'):
|
||||
res.append(self.env.ref('project.rating_rating_menu_project').id)
|
||||
if self.env.user.has_group('project.group_project_stages'):
|
||||
res.append(self.env.ref('project.menu_projects').id)
|
||||
res.append(self.env.ref('project.menu_projects_config').id)
|
||||
return res
|
||||
Loading…
Add table
Add a link
Reference in a new issue