From e4529b45eee093af2b51415809c1879e081af18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 16 Dec 2021 22:12:42 +0100 Subject: [PATCH] Clear transaction cache after commit If there are multiple commits, the data in the database may have been modified. issue11014 review381481003 --- trytond/transaction.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trytond/transaction.py b/trytond/transaction.py index 6767e6f12b..19e0507115 100644 --- a/trytond/transaction.py +++ b/trytond/transaction.py @@ -238,6 +238,8 @@ class Transaction(object): for datamanager in self._datamanagers: datamanager.tpc_vote(self) self.started_at = self.monotonic_time() + for cache in self.cache.values(): + cache.clear() Cache.commit(self) self.connection.commit() except Exception: