From c1279cd52aed189293e36c8bc646935b43485a5e Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Thu, 5 Nov 2020 12:54:15 +0000 Subject: [PATCH] [FIX] test_impex: cursor cache in tests As the same cursor is used by all tests, make sure to clear its `cache` upon setup. --- odoo/addons/test_impex/tests/test_load.py | 1 + 1 file changed, 1 insertion(+) diff --git a/odoo/addons/test_impex/tests/test_load.py b/odoo/addons/test_impex/tests/test_load.py index 6a7144ae128..c3dfba07534 100644 --- a/odoo/addons/test_impex/tests/test_load.py +++ b/odoo/addons/test_impex/tests/test_load.py @@ -40,6 +40,7 @@ class ImporterCase(common.TransactionCase): super(ImporterCase, self).setUp() self.model = self.env[self.model_name] self.env['ir.model.data'].clear_caches() + self.cr.cache.clear() def import_(self, fields, rows, context=None): return self.model.with_context(context or {}).load(fields, rows)