From b24bc72b1c60b861ad45eed2f4a6f6aea719a35f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 10 Aug 2012 10:19:09 +0200 Subject: [PATCH] [CLEAN] res.company: cleaned some code. bzr revid: tde@openerp.com-20120810081909-9c6uaqh9rlskelbo --- openerp/addons/base/res/res_company.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openerp/addons/base/res/res_company.py b/openerp/addons/base/res/res_company.py index 77fb9b635e5..526ad0e0bad 100644 --- a/openerp/addons/base/res/res_company.py +++ b/openerp/addons/base/res/res_company.py @@ -149,11 +149,9 @@ class res_company(osv.osv): def _search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False, access_rights_uid=None): - if context is None: context = {} - user_preference = context.get('user_preference', False) - if user_preference: + if context.get('user_preference'): # We browse as superuser. Otherwise, the user would be able to # select only the currently visible companies (according to rules, # which are probably to allow to see the child companies) even if