Odoo Helper for VS Code
Odoo Helper for VS Code (Cybrosys Assista: Odoo Helper) adds Odoo-aware completions, navigation, snippets and code generators to Visual Studio Code. It supports Odoo 18, 19 and 20.
Install it from the Visual Studio Marketplace. It is free, and published by Cybrosys Technologies, an Odoo Official Partner. The product page and the source on GitHub are also available.
Using Assista IDE?
Assista IDE bundles these features, so you do not need to install the extension there. See Assista IDE.
The extension indexes the models, fields, methods, XML IDs, QWeb templates, JavaScript registries and CSS classes in your workspace. It uses that index to suggest the right names as you type, jump to definitions, and generate files for the Odoo version you work on.
Quick facts
- Cost: free to install.
- Provides: Odoo code templates (Python, XML and OWL boilerplate from a keyword), Odoo-aware snippets and scaffolding that follow Odoo conventions, and a pairing with Assista IDE or standalone use in your existing editor setup.
- Not the IDE: the plugin is a separate product from Assista IDE, a full editor with Assista Coder, one-click environments and the other IDE features. The plugin brings a smaller set of the same tooling to VS Code.
- Also on the website: the Assista website lists the Odoo Helper plugins as supported on VS Code, Antigravity, Cursor, Kiro, Windsurf and Trae, as well as PyCharm.
- Prefer JetBrains? See Odoo Helper for PyCharm.
What you can do
- Create modules and files. Scaffold six module types and individual Python, XML and security files from the Explorer. See Module templates and File creator.
- Create OWL and POS code. Generate OWL components and services, and extend Point of Sale screens. See OWL components and POS screen extension.
- Generate code from a model. Build views, QWeb reports and access rights from a model class. See Model tools.
- Navigate across files. Jump between XML and Python, from a view to its field or a button to its method. See Go to Definition.
- Complete as you type. Get model, field, method, widget, template and CSS class suggestions. See Smart suggestions.
- Insert snippets. Type
odooto insert models, fields, views and actions. See Snippets. - Install modules from the editor. Connect to a running Odoo server. See Odoo connectivity.
- Check coding standards. Turn on optional warnings based on Odoo's guidelines. See Code inspection.
Supported Odoo versions
Completions, snippets, generators and scaffolds support Odoo 18, 19 and 20. The extension detects the version of your project and shows it in the status bar, for example Odoo v20 (Auto). Click it to change the version.
| Topic | Odoo 18 | Odoo 19 | Odoo 20 |
|---|---|---|---|
| Access rights file | ir.model.access.csv | ir.model.access.csv | ir.access.csv |
| Security groups | category_id | privilege_id | privilege_id |
| SQL constraints | _sql_constraints | models.Constraint | models.Constraint, models.Index, models.UniqueIndex |
| JSON routes | type='json' | type='jsonrpc' | type='jsonrpc' |
| OWL | OWL 2 | OWL 2 | OWL 3 |
| Report action | With report_file | With report_file | Without report_file |
| Manifest version | 18.0.1.0.0 | 19.0.1.0.0 | 20.0.1.0.0 |
The setting cybrosys-assista-odoo-helper.odooVersion defaults to auto. Set it to 18, 19 or 20 to fix the version. See Install for how the version is detected.
Status bar and commands
The extension adds two items to the status bar: the Odoo version (for example Odoo v20 (Auto)) and the Odoo server (Odoo Server, or Odoo: <host> once you connect). Click an item to change it.
Run these from the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on macOS):
| Command | What it does |
|---|---|
| Assista: Set Odoo Version | Choose Auto, 20, 19 or 18 for this workspace. |
| Assista: Update Odoo Server Settings | Set the server URL, database, user and password. |
| Assista: Remove Index Data (Clear Cache) | Delete the saved index. Reload the window to rebuild it. |
| Add File to Manifest | Add the current file to the manifest data list. |
Add to __init__.py | Add the current Python file or folder to the parent __init__.py. Also in the editor and Explorer context menus. |
Get started
- Install the extension.
- Open a folder that contains Odoo modules. The extension activates when the workspace has a
__manifest__.pyor anodoo/release.py. - Add the Odoo source folder (the one with
odoo/andaddons/) to your workspace so core models, fields and templates are suggested too. - Right-click a folder in the Explorer and choose Assista Odoo, or start typing.
Performance
- The extension activates only in Odoo workspaces, and loads its commands the first time you use them.
- Indexing runs in a separate, low-priority process. It starts a few seconds after the window opens and stops when idle. It shows no progress and no notifications.
- The index is saved between sessions. Afterwards only changed files are read again.
- As a reference, the first index of the complete Odoo 20 source takes about half a minute in the background.
Tips and limits
- Indexing runs in the background a few seconds after the window opens. Completions that need the index appear once it is ready, and the saved index is reused the next time you open the workspace.
- Large workspaces can turn off parts of the index. See Settings.
- Go to Definition works from XML and Python files, not from JavaScript.
- Inside an
<xpath>of an inherited view, field suggestions use the view record rather than the inherited view's model. dependssuggestions appear on lines that contain the worddepends.- Add File to Manifest adds the file to the manifest's
datalist only, and the list must already exist. - After Remove Index Data (Clear Cache), reload the window to rebuild the index.
- The model inheritance graph and the module dependency graph load their drawing library from the internet, so they need a connection.