vscode-odoo
vscode-odoo copied to clipboard
cannot resolve from odoo.addons.* when the module is in oca folder or enterprise
Hi, on my local i'm developing on visual code and I'm using some modules from oca and enterprise. it cannot resolve the imports from there. "Import "odoo.addons.fastapi.tests.common" could not be resolved"
the addon path is correctly configured, in fact all modules work perfectly.
instead native odoo addons and my homemade modules that are in the addons folder are correctly displayed in the autocomplete for that reason i believe is a misconfiguration but i cannot figurate out how to fix it.
i'm developing on mac, my folder structure is
. ├── addons ├── build ├── config ├── enterprise ├── k3s ├── oca ├── odoo ├── scripts ├── snippets ├── template ├── themes ├── thirdparty ├── tmp └── venv16.0
my addon path shows
INFO ? odoo: addons paths: ['/Volumes/DEV/odoo-myproject/odoo/odoo/addons', '/Volumes/DEV/odoo-myproject/venv16.0/lib/python3.11/site-packages/odoo/addons', '/Users/dd/Library/Application Support/Odoo/addons/16.0', '/Volumes/DEV/odoo-myproject/themes', '/Volumes/DEV/odoo-myproject/odoo/addons', '/Volumes/DEV/odoo-myproject/oca/partner-contact', '/Volumes/DEV/odoo-myproject/addons/server_tools', '/Volumes/DEV/odoo-myproject/oca/web', '/Volumes/DEV/odoo-myproject/oca/server-tools', '/Volumes/DEV/odoo-myproject/oca/sale-workflow', '/Volumes/DEV/odoo-myproject/oca/purchase-workflow', '/Volumes/DEV/odoo-myproject/oca/server-env', '/Volumes/DEV/odoo-myproject/addons/sale_workflow', '/Volumes/DEV/odoo-myproject/addons/hr', '/Volumes/DEV/odoo-myproject/addons/purchase_workflow', '/Volumes/DEV/odoo-myproject/enterprise', '/Volumes/DEV/odoo-myproject/oca/bank-payment', '/Volumes/DEV/odoo-myproject/oca/server-backend', '/Volumes/DEV/odoo-myproject/oca/account-invoicing', '/Volumes/DEV/odoo-myproject/addons/partner_contact', '/Volumes/DEV/odoo-myproject/addons/account_invoicing', '/Volumes/DEV/odoo-myproject/addons/mymodules', '/Volumes/DEV/odoo-myproject/oca/web-api', '/Volumes/DEV/odoo-myproject/oca/rest-framework', '/Volumes/DEV/odoo-myproject/oca/server-auth']
in the oca folder there are the modules i'm using, and as said are perfectly working in my odoo instance
oca ├── account-invoicing ├── bank-payment ├── partner-contact ├── purchase-workflow ├── rest-framework ├── sale-workflow ├── server-auth ├── server-backend ├── server-env ├── server-tools ├── web └── web-api