vscode-odoo
vscode-odoo copied to clipboard
base not recognized
Everything works in my setup except the base folder is not resolved.
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?
Hello @weinni2000 ,
What version of Odoo are you working on ?
18, but I will later check if it's the same problem in the other versions
@weinni2000 ,
What about other standard modules (account, sale,...), are they also not recognized ?
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.
@weinni2000 ,
How does your project structure look in VSCode?
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
@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.
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.
@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.