mirror of
https://gitlab.com/flectra-community/server-ux.git
synced 2024-11-15 10:42:08 +00:00
18 lines
571 B
Python
18 lines
571 B
Python
|
# © 2016 Opener B.V. (<https://opener.am>)
|
||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||
|
from flectra import api, models
|
||
|
|
||
|
|
||
|
class IrUiMenu(models.Model):
|
||
|
_inherit = "ir.ui.menu"
|
||
|
|
||
|
@api.model
|
||
|
def _visible_menu_ids(self, debug=False):
|
||
|
"""Set debug = True, so that group_no_one is not filtered out of the
|
||
|
user's groups"""
|
||
|
if not debug:
|
||
|
debug = self.env.user.has_group(
|
||
|
"base_technical_features.group_technical_features"
|
||
|
)
|
||
|
return super()._visible_menu_ids(debug=debug)
|