[FIX] http: clear environment/caches on transaction rollback

Backport of 8423a0df3482567b0e2f77852dda14b80a029401

Clear the cache/environment in addition to rolling back
the cursor, in order to retry the transaction with fresh
data, not partially stale data.
This commit is contained in:
Olivier Dony 2016-05-11 01:01:54 +02:00
parent a0366b3a66
commit ac8b7e90b5
1 changed files with 1 additions and 0 deletions

View File

@ -306,6 +306,7 @@ class WebRequest(object):
# case, the request cursor is unusable. Rollback transaction to create a new one.
if self._cr:
self._cr.rollback()
self.env.clear()
return self.endpoint(*a, **kw)
if self.db: