Skip to content

Commit

Permalink
[IMP] core: deprecate odoo.registry()
Browse files Browse the repository at this point in the history
USe directly odoo.modules.registry.Registry.

odoo/odoo#178784

closes #132

Related: odoo/enterprise#69269
Signed-off-by: Christophe Simonis (chs) <[email protected]>
  • Loading branch information
kmagusiak committed Sep 5, 2024
1 parent c8c1a6e commit b7fbb07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b7fbb07

Please sign in to comment.