Odoo Dev ToolsYour complete Odoo development environment inside VS Code. Run and debug the server, navigate code with full Odoo awareness, explore models, hover for instant context, browse database records, watch live logs — all without leaving your editor. Setup1 — Install the extensionInstall from the VS Code marketplace. 2 — Select Python interpreter
3 — Point to your Odoo conf file (recommended)
The extension reads 4 — Configure addons pathsClick the folder icon in the panel title bar → Manage Addons Paths, or set directly:
5 — Run OdooPress Panel Layout
FeaturesServer Management
Module Management
Right-click any
Build output appears in the Odoo Logs panel automatically. Background IndexingOn startup, background workers index your addons. The index powers all code intelligence features.
Saving a Code Intelligence — CompletionsCompletions are context-aware and Odoo-specific:
Code Intelligence — NavigationGo to Definition (F12)Jumps to the definition of the symbol at the cursor:
Go to Declaration (Ctrl+F12)Goes to the original declaration — the source file where the model or field was first created, not an Find All References (Shift+F12)Shows every usage of the symbol across the codebase:
Go to Model from selection (
|
| Search | Result |
|---|---|
SaleOrder |
Class / model by Python name |
action_confirm |
Method across all models |
partner_id |
Field across all models |
"sale.order" |
Model by dotted name |
xmlid.sale.action_quotations |
XML ID |
Code Intelligence — Hover
Python file hover
Hover any Odoo symbol for instant context:
- Model class /
_name/_inherit— shows inherited modules, field count, method count, full inheritance chain - Field definition — shows type, comodel, compute method, related chain, flags (required/readonly/store), XML views using this field
- Method definition — shows decorators,
@api.dependsfields, override chain, callers - Model string
'res.partner'— shows model summary __manifest__.pydepends list — hover any dependency name to see that module's direct and transitive deps, version, and description
XML file hover
model="res.partner"— shows model summary<field name="partner_id">— shows field type and Python declarationref="module.view_id"— shows view name, model, inheritance tree
Code Intelligence — Diagnostics
The extension highlights code issues as you type or save:
- Domain field validation — warns when a domain references a field that does not exist on the model. Handles prefix-operator domains (
['|', ('f1', op, v1), ('f2', op, v2)]) and multi-line domains correctly. - Missing super() in ORM overrides — warns when
create(),write(),unlink(),copy()or other ORM methods are overridden without callingsuper(). - Unused @api.depends field — warns when a field listed in
@api.depends('field1', 'field2')is never accessed asself.field1in the method body. - Deprecated
attrs=in XML — highlightsattrs={"invisible": [...]}in XML with a quickfix to auto-convert to Odoo 17/18 inline syntax (invisible="state != 'draft'").
Code Intelligence — Quickfixes
- attrs= to inline — click the lightbulb on any
attrs=line to convert a single line or the entire file to Odoo 18 inline attribute syntax. Handles|,&,!operators in domains. - @api.depends suggestion — inside any
_compute_method, a quickfix suggests fields to add to@api.dependsbased onself.fieldaccesses in the method body.
Code Intelligence — Outline
The Outline panel (and breadcrumbs) show a clean Odoo-aware symbol tree for Python, XML, and JavaScript files:
Python files:
- Model with
_namelabel (e.g.res.partner [+]) - Fields grouped under the model
- Methods with full signatures:
action_confirm(self),_compute_total(self, vals) - Decorators shown as icons
- Nested defs shown as children
XML files:
- Views labeled by tag and purpose:
<form> sale.order,<rule> Allow All - Records:
<cron> Clean Old Sessions - Menus, actions, security rules with meaningful labels
JavaScript files:
- OWL components with
setup(), lifecycle, event handlers - Patches:
patch(ClassName, {...}) - Registry entries:
registry.category('...').add(...) - Arrow functions, static properties, imports
Model Explorer
Tree view of all models with full deep inheritance:
- Fields — type description, comodel link, compute method, flags
- Functions — full signature
(params) -> returnType, decorators - Views — full inheritance tree per model
- Auto-reveal — cursor movement auto-highlights the matching model/field/method in the tree
Right-click model — Go to XML View, Open in Odoo Browser, Browse Records, Copy Model Name
Right-click field — Find in XML Views, Browse Field Values
Right-click method — Find Method Usages
Quick Find
Ctrl+Alt+N — live search with compound syntax:
| Input | Result |
|---|---|
res.partner |
models matching name |
@name |
models with field starting with name |
#action |
functions starting with action |
:sale |
models from module sale |
res.partner@name |
fields in res.partner only |
res.partner#action |
functions in res.partner only |
Log Panel
Live log panel at the bottom:
- Filter buttons — ALL / CRITICAL / ERROR / WARNING / INFO / DEBUG with counts
- Search — live search with highlight
- Err navigation — jump to previous/next error
- Traceback grouping — collapsed by default, click to expand
- File links —
File "path.py", line 42are clickable, jump directly to that line - Dense mode — toggle to show only time + level + message for a more compact view
- Font size — A- / A+ buttons scale the entire panel; size is saved across restarts
- Path reduction — long file paths shown as
.../module/file.py, full path on hover - Editor tab — open the log in a standalone editor tab that can be dragged to any window or monitor
Data Browser
Interactive table in an editor tab:
- Browse model records or field values from DB
- Sortable columns,
%term%search, custom SQL bar - Open in Odoo form view, copy cell value on double-click
SQL Tools
- Tables — all public tables, filterable. Browse, show columns, copy SELECT
- History — last 20 queries, click to re-run
- Run SQL (
Ctrl+Shift+Q) — result in data browser
JS Debugging
- Launch Chrome Debug — opens Chrome with remote debugging port +
?debug=assets - Attach JS Debugger — attaches VS Code to Chrome with auto-generated
pathMappingfrom your addons paths
Database Tools
- Switch Database — lists all PostgreSQL DBs
- Copy Database —
createdb -T source newname - Drop Database — with confirmation
- Clear Asset Bundles — deletes
/web/assets/*attachments (force-regenerate JS/CSS bundles)
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+Shift+R |
Run Odoo |
Ctrl+Shift+D |
Debug Odoo |
Ctrl+Shift+S |
Stop Odoo |
Ctrl+Shift+U |
Update Module |
Ctrl+Shift+I |
Install Module |
Ctrl+Shift+G |
Update Changed Modules |
Ctrl+Shift+B |
Open Odoo in Browser |
Ctrl+Shift+O |
Open Odoo Shell |
Ctrl+Shift+Q |
Run SQL |
Ctrl+Shift+M |
Go to Model |
Ctrl+Shift+X |
Go to XML ID |
Ctrl+Shift+T |
Toggle Py / XML |
Ctrl+Shift+. |
Go to Function Definition |
Ctrl+Alt+N |
Quick Find |
Ctrl+Alt+E |
Focus Panel |
F12 |
Go to Definition |
Ctrl+F12 |
Go to Original Declaration |
Shift+F12 |
Find All References |
Ctrl+T |
Workspace Symbol Search |
Settings Reference
| Setting | Default | Description |
|---|---|---|
| odooDebugger.configFile | .odoorc | Odoo conf file path |
| odooDebugger.database | | DB name (auto-read from conf) | | `odooDebugger.addonsPaths` | `[]` | Addons directories | | `odooDebugger.odooBinPath` | | Path to odoo-bin (auto-detected) |
| odooDebugger.venvPath | | Python interpreter (auto-detected) | | `odooDebugger.port` | `8069` | Odoo HTTP port | | `odooDebugger.extraArgs` | `[]` | Extra odoo-bin args | | `odooDebugger.debugOptions` | `{justMyCode:false}` | debugpy launch options | | `odooDebugger.dbHost` | | PostgreSQL host |
| odooDebugger.dbPort | | PostgreSQL port | | `odooDebugger.dbUser` | | PostgreSQL user |
| odooDebugger.dbPassword | | PostgreSQL password | | `odooDebugger.logPanel.enabled` | `true` | Enable log panel | | `odooDebugger.logPanel.logFile` | `/tmp/odoo-vscode.log` | Log file path | | `odooDebugger.logPanel.autoEditorTab` | `false` | Always open log in editor tab | | `odooDebugger.captureStdout` | `false` | Show `print()` output in log panel as `[PRINT]` entries | | `odooDebugger.outline.labelMode` | `short` | `short` or `full` outline labels | | `odooDebugger.notifications` | `all` | Toast notifications: `all`, `errors-only`, `silent`, `auto-dismiss` | | `odooDebugger.modelExplorer.sources` | `[]` | Addons dirs to scan (empty = use addonsPaths) | | `odooDebugger.modelExplorer.groupByModule` | `true` | Group by module | | `odooDebugger.modelExplorer.sortOrder` | `alpha` | `alpha` or `recent` | | `odooDebugger.modelExplorer.typeFilter` | `model` | Default type filter on startup | | `odooDebugger.modelExplorer.showViews` | `true` | Show Views folder | | `odooDebugger.modelExplorer.autoReveal` | `true` | Auto-reveal on cursor move | | `odooDebugger.upgradeScript` | | Custom upgrade script |
| odooDebugger.chromePath | `` | Chrome binary path |
| odooDebugger.chromeDebugPort | 9222 | Chrome debug port |
Requirements
- VS Code
1.85.0or later ms-python.debugpyextension (auto-installed)- Python with Odoo dependencies installed
- PostgreSQL with
psqlon PATH - Odoo source with
odoo-bin
License
MIT © Mohit Ghodasara