From ac8b7e90b59a7eb9accd6c4214931fac7a4d54b6 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 11 May 2016 01:01:54 +0200 Subject: [PATCH] [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. --- openerp/http.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openerp/http.py b/openerp/http.py index b25d5547807..ba71c93cc7d 100644 --- a/openerp/http.py +++ b/openerp/http.py @@ -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: