[IMP] Performance: by-pass call to _apply_ir_rules for user admin

bzr revid: cto@openerp.com-20131205121118-0f9087y2huo7y44l
This commit is contained in:
Cecile Tonglet 2013-12-05 13:11:18 +01:00
parent 3a6953c1d0
commit cdff5c1366
1 changed files with 3 additions and 0 deletions

View File

@ -4711,6 +4711,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