[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
This commit is contained in:
Olivier Dony 2012-12-19 11:13:15 +01:00
parent 680ae2969d
commit 5ab624b11e
1 changed files with 1 additions and 2 deletions

View File

@ -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):