Hello world!
After I released the first version of the VSCode extension for Odoo at the end of January, it took me almost three months to implement new features planned for the new version 0.2. This slowness is due to the fact that unlike the IntelliJ Platform on which PyCharm is based, VSCode doesn't have a unified and extensible platform for building language and framework features so it requires more work than the PyCharm plugin for Odoo. For easy understanding, you can see the illustration below.
Yes, this game isn't easy, but so far I'm fine. Here are some highlights in this version:
Module name completion
Knowing about all Odoo modules in a VSCode workspace is the most basic foundation for all other features of the Odoo extension. We now have code completion, navigation and validation for module references in __manifest__.py
.
The Odoo extension is currently only able to discover Odoo modules added to VSCode workspace. So, you have to add your custom addons as well as the Odoo source code to your VSCode workspace.
Model name completion
The next foundation is knowing about all Odoo models. We now also have code completion, navigation and validation for model names in several places, such as the _inherit
attribute of a model class and the comodel
argument of a relational field definition.
Note that the Odoo extension respects module dependencies when discovering available models.
What is next?
Based on the above two foundations, I can now start teaching the Odoo extension to understand the inheritance mechanism of the Odoo ORM framework. It's great, isn't it?