Skip to content

Commit

Permalink
Merge pull request #60 from acsone/init_registry_depreciated
Browse files Browse the repository at this point in the history
odoo.registry deprecated
  • Loading branch information
sbidoul committed Sep 25, 2024
2 parents 84f1690 + 392aa29 commit d26298a
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 d26298a

Please sign in to comment.