From 5ab624b11e173da99d3059e10d34aa35e4562de8 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 19 Dec 2012 11:13:15 +0100 Subject: [PATCH] [FIX] res.users: context_get cache was not cleared properly, due to braindead implementation of ormcache (skiparg is misused and off by 1 in clear_cache) Discarding the cache completely is suboptimal but makes the code simpler, and this is not performance critical anyway. The cache is mostly useful during module installation, which involves no call to clear_cache. bzr revid: odo@openerp.com-20121219101315-1ccuwm6nvmov12zv --- openerp/addons/base/res/res_users.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openerp/addons/base/res/res_users.py b/openerp/addons/base/res/res_users.py index a2301cec37e..df83f0ac1e3 100644 --- a/openerp/addons/base/res/res_users.py +++ b/openerp/addons/base/res/res_users.py @@ -299,8 +299,7 @@ class res_users(osv.osv): for id in ids: if id in self._uid_cache[db]: del self._uid_cache[db][id] - self.context_get.clear_cache(self, cr) - + self.context_get.clear_cache(self) return res def unlink(self, cr, uid, ids, context=None):