-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
upgrade_analysis: Odoo-version #2736
Comments
could you make a PR ? it will be more readable. thanks ! |
But it should work as is AFAIK. |
FYI: using Python 3.9.2 I get this error with current code: 2023-10-16 14:04:37,554 417033 ERROR odoodev3 odoo.http: Exception during JSON request handling. The above exception was the direct cause of the following exception: Traceback (most recent call last): |
OK, true. String comparison should be done instead of converting to float. |
We'll be setting up a specific development-server for OCA-modules in a couple of weeks. That way I can work (cleanly) on OCA addons using github. But for now this is the only way I can help. Sorry about that. |
Module
upgrade_analysis
Describe the bug
Retrieved Odoo-version
To Reproduce
14.0, 15.0, probably others
Steps to reproduce the behavior:
Expected behavior
Work out the correct main version 14.0 even though the retrieved version is formatted as 14.0-20230920
Additional context
models/upgrade_analysis.py
Current code, line 78:
if float(self.config_id.version < 14.0:
return connection.env["openupgrade.record"]
else:
return connection.env["upgrade.record"]
Proposed code:
try:
version, subversion = self.config_id.version.split("-")
except ValueError:
version = self.config_id.version
if float(version) < 14.0:
return connection.env["openupgrade.record"]
else:
return connection.env["upgrade.record"]
The text was updated successfully, but these errors were encountered: