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.

19 lines
694 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 models
  5. class Base(models.AbstractModel):
  6. _inherit = 'base'
  7. def user_has_groups(self, groups):
  8. """ Return True for users in the technical features group when
  9. membership of the original group is checked, even if debug mode
  10. is not enabled.
  11. """
  12. if ('base.group_no_one' in groups.split(',') and
  13. self.env.user.has_group(
  14. 'base_technical_features.group_technical_features')):
  15. return True
  16. return super(Base, self).user_has_groups(groups)