From c7cb6b647a49b3a89f298137b26b7f3fb5c55bde Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 29 Oct 2010 03:01:37 +0200 Subject: [PATCH] [FIX] res_company: override low-level _search to make sure "selection-widget lists" are filtered too (pending refactoring) lp bug: https://launchpad.net/bugs/663998 fixed bzr revid: odo@openerp.com-20101029010137-0qpwais2d0jk0og8 --- bin/addons/base/res/res_company.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/addons/base/res/res_company.py b/bin/addons/base/res/res_company.py index 4276eeac3bc..a2ed3c05840 100644 --- a/bin/addons/base/res/res_company.py +++ b/bin/addons/base/res/res_company.py @@ -90,8 +90,8 @@ class res_company(osv.osv): 'account_no':fields.char('Account No.', size=64), } - def search(self, cr, uid, args, offset=0, limit=None, order=None, - context=None, count=False): + 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 = {} @@ -106,8 +106,8 @@ class res_company(osv.osv): user = self.pool.get('res.users').browse(cr, uid, user_id, context=context) cmp_ids = list(set([user.company_id.id] + [cmp.id for cmp in user.company_ids])) return cmp_ids - return super(res_company, self).search(cr, uid, args, offset=offset, limit=limit, order=order, - context=context, count=count) + return super(res_company, self)._search(cr, uid, args, offset=offset, limit=limit, order=order, + context=context, count=count, access_rights_uid=access_rights_uid) def _company_default_get(self, cr, uid, object=False, field=False, context=None): """