It's been a while since I blogged about the PyCharm plugin for Odoo. You may already know that I'm currently busy developing the VSCode extension for Odoo. Along with that, I'm still improving the PyCharm plugin continuously. It's just that I'm lazy to blog these days.
For a long time, we needed to manually clone and attach Odoo Stubs to projects for better type inference and code completion. This is quite inconvenient because it takes more work to setup projects and keep the stubs up to date. So as of version 2023.7, the plugin will ship with the built-in stubs and automatically attach the appropriate version of stubs to your Odoo projects. New versions of the plugin will include updated stubs, so you don't need to update it manually either.
If you currently have your own stubs attached to your projects, I recommend detaching them to use the built-in stubs shipped with the plugin. The plugin will automatically add the built-in stubs one you detach your own stubs.
To verify if the built-in stubs is working properly, do the following:
1. Check if the built-in stubs is attached as a content root of a odoo project.
2. Open a core file in the odoo source code such as
api.py. Check if you can navigate to the corresponding stubs through the asterisk gutter icons.