Skip to content

Commit b7fbb07

Browse files
committed
[IMP] core: deprecate odoo.registry()
USe directly odoo.modules.registry.Registry. odoo/odoo#178784 closes #132 Related: odoo/enterprise#69269 Signed-off-by: Christophe Simonis (chs) <[email protected]>
1 parent c8c1a6e commit b7fbb07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/testing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import odoo
99
from odoo import api, release
10+
from odoo.modules.registry import Registry
1011
from odoo.tests.common import BaseCase, MetaCase, TransactionCase, get_db_name
1112
from odoo.tools import config
1213
from odoo.tools.parse_version import parse_version
@@ -143,7 +144,7 @@ def _init_db(self):
143144
UpgradeCommon.__initialized = True
144145

145146
def _setup_registry(self):
146-
self.registry = odoo.registry(get_db_name())
147+
self.registry = Registry(get_db_name())
147148
self._data_table_cr = (
148149
self.registry.cursor()
149150
) # use to commit in upgrade_test_data, dont use it for anything else

0 commit comments

Comments
 (0)