-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support odoo>=18.0 #80
base: master
Are you sure you want to change the base?
Conversation
7b915cd
to
15b5912
Compare
15b5912
to
ca110a2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #80 +/- ##
=========================================
Coverage ? 33.33%
=========================================
Files ? 1
Lines ? 117
Branches ? 0
=========================================
Hits ? 39
Misses ? 78
Partials ? 0 ☔ View full report in Codecov by Sentry. |
tested against odoo 18.0 and 14.0 real projects |
Registry class is present and signature does change since v10.0
@@ -165,7 +164,7 @@ def load_registry(): | |||
# since Odoo sets it when loading test suites. | |||
threading.current_thread().testing = True | |||
with _worker_db_name() as db_name: | |||
odoo.registry(db_name) | |||
odoo.modules.registry.Registry(db_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that we won't be able to use the latest releases w/ odoo < 18.
Can't we leverage an ImportError instead?
If not, fine, but we have to document that this breaks compat w/ former odoo versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to work with < 18
Avoid logging error/warning on: fix 2/3 topic of #79 (you needs this PR to make is works odoo/odoo#184409)
test_enable=True
we get a logging error which is very noisy while developing. ie :bacause of this code https://github.com/odoo/odoo/blob/18.0/odoo/tests/common.py#L93-L101
because this
registry
method becomes deprecated https://github.com/odoo/odoo/blob/18.0/odoo/__init__.py#L37 we can safely use the Registry as this method do because we are setting the database and this code hasn't change from odoo v10.0