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.

18 lines
642 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 openerp 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.pool['res.users'].has_group(
  13. self.env.cr, self.env.uid,
  14. 'base_technical_features.group_technical_features')
  15. return super(IrUiMenu, self)._visible_menu_ids(debug=debug)