From b7fbb070807f8393a0b5dbac274e1651d32b309d Mon Sep 17 00:00:00 2001 From: "Krzysztof Magusiak (krma)" Date: Fri, 30 Aug 2024 18:13:59 +0000 Subject: [PATCH] [IMP] core: deprecate odoo.registry() USe directly odoo.modules.registry.Registry. odoo/odoo#178784 closes odoo/upgrade-util#132 Related: odoo/enterprise#69269 Signed-off-by: Christophe Simonis (chs) --- src/testing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/testing.py b/src/testing.py index 72ac1319..1ccb7a8f 100644 --- a/src/testing.py +++ b/src/testing.py @@ -7,6 +7,7 @@ import odoo from odoo import api, release +from odoo.modules.registry import Registry from odoo.tests.common import BaseCase, MetaCase, TransactionCase, get_db_name from odoo.tools import config from odoo.tools.parse_version import parse_version @@ -143,7 +144,7 @@ def _init_db(self): UpgradeCommon.__initialized = True def _setup_registry(self): - self.registry = odoo.registry(get_db_name()) + self.registry = Registry(get_db_name()) self._data_table_cr = ( self.registry.cursor() ) # use to commit in upgrade_test_data, dont use it for anything else