[FIX] base: force local cursor in case of mismatch

This commit is contained in:
Olivier Dony 2016-10-03 17:43:44 +02:00
parent 12634e1227
commit ba7880a249
No known key found for this signature in database
GPG Key ID: CD556E25E8A6D0D4
1 changed files with 1 additions and 0 deletions

View File

@ -511,6 +511,7 @@ class res_users(osv.osv):
if not passwd: if not passwd:
# empty passwords disallowed for obvious security reasons # empty passwords disallowed for obvious security reasons
raise openerp.exceptions.AccessDenied() raise openerp.exceptions.AccessDenied()
db = self.pool.db_name
if self.__uid_cache.setdefault(db, {}).get(uid) == passwd: if self.__uid_cache.setdefault(db, {}).get(uid) == passwd:
return return
cr = self.pool.cursor() cr = self.pool.cursor()