diff --git a/click_odoo/env.py b/click_odoo/env.py index f85aefe..83b2c30 100644 --- a/click_odoo/env.py +++ b/click_odoo/env.py @@ -12,7 +12,7 @@ @contextmanager def OdooEnvironment(database, rollback=False, **kwargs): with environment_manage(): - registry = odoo.registry(database) + registry = odoo.modules.registry.Registry(database) try: with registry.cursor() as cr: uid = odoo.SUPERUSER_ID diff --git a/newsfragments/60.feature b/newsfragments/60.feature new file mode 100644 index 0000000..3329680 --- /dev/null +++ b/newsfragments/60.feature @@ -0,0 +1 @@ +Use ``odoo.modules.registry.Registry()`` instead of the now deprecated `odoo.registry()`.