Skip to content

Commit

Permalink
Replace deprecated odoo.registry()
Browse files Browse the repository at this point in the history
As of Odoo 18, odoo.registry is deprecated.
See odoo/odoo@447b355
  • Loading branch information
qgroulard authored and sbidoul committed Sep 25, 2024
1 parent 84f1690 commit 392aa29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion click_odoo/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions newsfragments/60.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use ``odoo.modules.registry.Registry()`` instead of the now deprecated `odoo.registry()`.

0 comments on commit 392aa29

Please sign in to comment.