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

Backport of 8423a0df34

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