[FIX] orm: early return within ``_apply_ir_rules`` for superuser.

Save a few time by not not trying to apply ir.rule for superuser, that will
  anyway be skipped within ir.rule's ``_compute_domain`` method.

bzr revid: xal@openerp.com-20131210140330-oui4oy8pez12xkxv
This commit is contained in:
Xavier ALT 2013-12-10 15:03:30 +01:00
commit 9a4c62861f
1 changed files with 3 additions and 0 deletions

View File

@ -4717,6 +4717,9 @@ class BaseModel(object):
:param query: the current query object
"""
if uid == SUPERUSER_ID:
return
def apply_rule(added_clause, added_params, added_tables, parent_model=None, child_object=None):
""" :param string parent_model: string of the parent model
:param model child_object: model object, base of the rule application