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

base not recognized #92

Open
weinni2000 opened this issue Feb 9, 2025 · 9 comments
Open

base not recognized #92

weinni2000 opened this issue Feb 9, 2025 · 9 comments

Comments

@weinni2000
Copy link

Everything works in my setup except the base folder is not resolved.

Image
I get this error message: Could not find module 'base'

I tried to add it:
"python.analysis.extraPaths": [
"XXX/odoo/odoo/addons",

but still no success.

Background:
I use a doodba setup and everything else works as expected. Any pointers about the root cause of this?

@trinhanhngoc
Copy link
Member

Hello @weinni2000 ,

What version of Odoo are you working on ?

@weinni2000
Copy link
Author

18, but I will later check if it's the same problem in the other versions

@trinhanhngoc
Copy link
Member

@weinni2000 ,

What about other standard modules (account, sale,...), are they also not recognized ?

@weinni2000
Copy link
Author

all other modules work fine except in the xml views I get this error message. Everything else works like a charm. Thanks for the tool, it's really helpful.

Image

@trinhanhngoc
Copy link
Member

@weinni2000 ,

How does your project structure look in VSCode?

@weinni2000
Copy link
Author

I use doodba from oca: (https://github.com/Tecnativa/doodba)
So I have multiple folders like this for every odoo version.
The repos are all in the src folder inluding odoo and enterprise, the oca repos and my custom ones. (That's how it's recommended for doodba

Image

@trinhanhngoc
Copy link
Member

@weinni2000 ,

Can you try editing odoo/addons/base/__manifest__.py to see if the problem goes away? Any changes in manifest files will trigger modules reindexing.

@weinni2000
Copy link
Author

Hi, this solved the depends error.

I then also added a line to src/odoo/odoo/addons/base/models/ir_ui_view.py and then the errors in the view xml's also went away.
This works for me but would be nice if this works out of the box.

@trinhanhngoc
Copy link
Member

@weinni2000 ,

The indexing is activated automatically on new files and changed files. I will add an action for manually reindexing whole project if there are problems with indexing.

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

No branches or pull requests

2 participants