Odoo Shortcuts offers multiple configuration options to customize behavior according to your needs.
| Configuration Panel |
|---|
![]() |
![]() |
Ctrl+, (Windows/Linux) or Cmd+, (Mac)Setting: odooShortcuts.odooServerPaths
Defines where Odoo source files are installed so the LSP can index them.
{
"odooShortcuts.odooServerPaths": [
"/home/user/odoo",
"/home/user/enterprise",
"/opt/odoo/odoo"
]
}
Note: These paths are used for autocomplete and code navigation.
Core Addons: odooShortcuts.coreAddonPatterns
{
"odooShortcuts.coreAddonPatterns": [
"/odoo/addons/",
"/odoo/odoo/addons/",
"/openerp/addons/"
]
}
Enterprise Addons: odooShortcuts.enterpriseAddonPatterns
{
"odooShortcuts.enterpriseAddonPatterns": [
"/enterprise/",
"/odoo/enterprise/"
]
}
Setting: odooShortcuts.manifestFiles
Files that identify an Odoo addon.
{
"odooShortcuts.manifestFiles": [
"__manifest__.py"
]
}
Setting: odooShortcuts.autoRefresh
{
"odooShortcuts.autoRefresh": true
}
When enabled, the Odoo Explorer updates automatically when file system changes are detected.
Setting: odooFile.codelens.enabled
{
"odooFile.codelens.enabled": true
}
Enables/disables CodeLens links on models and components.

{
"odooShortcuts.fileHeaders.enabled": true
}

{
"odooShortcuts.fileHeaders.author": "Your Name",
"odooShortcuts.fileHeaders.email": "your@email.com",
"odooShortcuts.fileHeaders.company": "Your Company",
"odooShortcuts.fileHeaders.license": "LGPL-3"
}
Available licenses:
LGPL-3GPL-3AGPL-3MITApache-2.0BSD-3-ClauseCustom{
"odooShortcuts.fileHeaders.customLicense": "Copyright (c) 2024 Your Company. All rights reserved.",
"odooShortcuts.fileHeaders.pythonTemplate": "# -*- coding: utf-8 -*-\n# Copyright \n# License \n\n",
"odooShortcuts.fileHeaders.xmlTemplate": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright \n License \n-->\n\n",
"odooShortcuts.fileHeaders.javascriptTemplate": "/** @odoo-module **/\n// Copyright \n// License \n\n"
}
Available variables:
Setting: odooShortcuts.openFiles
{
"odooShortcuts.openFiles": true
}
When enabled, generated files open automatically in the editor.
Setting: odooShortcuts.envFiles
{
"odooShortcuts.envFiles": [
"~/.zshrc",
"~/.bashrc",
"~/.bash_profile"
]
}
Shell configuration files to read environment variables from.
See XML Formatter for detailed options.
{
"odooShortcuts.formatter.tabSize": 4,
"odooShortcuts.formatter.splitAttributes": false,
"odooShortcuts.formatter.emptyElementHandling": "selfClosing",
"odooShortcuts.formatter.preserveComments": true,
"odooShortcuts.formatter.odooTagSpacing": true
}
{
// Odoo Shortcuts Configuration
"odooShortcuts.odooServerPaths": [
"/home/developer/odoo",
"/home/developer/enterprise"
],
"odooShortcuts.coreAddonPatterns": [
"/odoo/addons/"
],
"odooShortcuts.enterpriseAddonPatterns": [
"/enterprise/"
],
"odooShortcuts.autoRefresh": true,
"odooShortcuts.openFiles": true,
// CodeLens
"odooFile.codelens.enabled": true,
// File Headers
"odooShortcuts.fileHeaders.enabled": true,
"odooShortcuts.fileHeaders.author": "John Doe",
"odooShortcuts.fileHeaders.email": "john@example.com",
"odooShortcuts.fileHeaders.company": "My Company",
"odooShortcuts.fileHeaders.license": "LGPL-3",
// Formatter
"odooShortcuts.formatter.tabSize": 4,
"odooShortcuts.formatter.preserveComments": true,
"odooShortcuts.formatter.odooTagSpacing": true
}
You can have different configurations per project. VS Code saves them in .vscode/settings.json within your workspace.
// .vscode/settings.json
{
"odooShortcuts.odooServerPaths": [
"${workspaceFolder}/../odoo"
]
}
Next: Keybindings