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.

16 lines
537 B

  1. # -*- coding: utf-8 -*-
  2. from openerp import api, models
  3. class IrUiMenu(models.Model):
  4. _inherit = 'ir.ui.menu'
  5. @api.model
  6. def _visible_menu_ids(self, debug=False):
  7. """ Set debug = True, so that group_no_one is not filtered out of the
  8. user's groups """
  9. if not debug:
  10. debug = self.pool['res.users'].has_group(
  11. self.env.cr, self.env.uid,
  12. 'base_technical_features.group_technical_features')
  13. return super(IrUiMenu, self)._visible_menu_ids(debug=debug)