[IMP] no need to compute *all* has_group calls if the first one fails
This commit is contained in:
parent
e555855f07
commit
63a6ba92e2
|
@ -1704,8 +1704,8 @@ class BaseModel(object):
|
|||
:return: True if the current user is a member of one of the
|
||||
given groups
|
||||
"""
|
||||
return any([self.pool.get('res.users').has_group(cr, uid, group_ext_id)
|
||||
for group_ext_id in groups.split(',')])
|
||||
return any(self.pool['res.users'].has_group(cr, uid, group_ext_id)
|
||||
for group_ext_id in groups.split(','))
|
||||
|
||||
def _get_default_form_view(self, cr, user, context=None):
|
||||
""" Generates a default single-line form view using all fields
|
||||
|
|
Loading…
Reference in New Issue