You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
587 B

  1. # coding: utf-8
  2. # © 2016 Opener B.V. (<https://opener.am>)
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from odoo import api, models
  5. class IrUiMenu(models.Model):
  6. _inherit = 'ir.ui.menu'
  7. @api.model
  8. def _visible_menu_ids(self, debug=False):
  9. """ Set debug = True, so that group_no_one is not filtered out of the
  10. user's groups """
  11. if not debug:
  12. debug = self.env.user.has_group(
  13. 'base_technical_features.group_technical_features')
  14. return super(IrUiMenu, self)._visible_menu_ids(debug=debug)