Skip to content
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

OLS30103 should not be an error #163

Open
william-andre opened this issue Dec 9, 2024 · 2 comments
Open

OLS30103 should not be an error #163

william-andre opened this issue Dec 9, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@william-andre
Copy link

When importing from another addon in the same path, it is not an issue if that addon is not in the dependencies.

The code will not populate the registry, fields won't exist, etc. But the code is still reachable and can be imported using the python import keyword without an error.

Maybe not the cleanest code in the end, but I think it should be bumped to an INFO instead of an ERROR, at least in the case where both modules are in the same addons path.

@fda-odoo fda-odoo added the question Further information is requested label Dec 9, 2024
@fda-odoo fda-odoo self-assigned this Dec 9, 2024
@fda-odoo
Copy link
Collaborator

fda-odoo commented Dec 9, 2024

I agree that this is not an 'error' as the code will work, but still. You have a dependency between the two modules and this is not reflected anywhere, except in this import statement.
I personnaly would let it as "error", but I can understand that some actual code is not following that rule, and it can be annoying to see them as errors.
I'll consider adding an option about this diagnostic (and in a more general way, for all diagnostics), so you'll be able to tweak the tool according your preferences.

@william-andre
Copy link
Author

An error should only be reported if the code will lead to a runtime error for instance.
Not when there is nothing wrong at all except the code not being the cleanest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants