Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Odoo Dev ToolkitNew to Visual Studio Code? Get it now.
Odoo Dev Toolkit

Odoo Dev Toolkit

stevenmarp

|
1 install
| (0) | Free
Complete toolkit for Odoo developers - snippets, XML validator, module scaffolding, security generator, and field autocomplete
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Odoo Dev Toolkit

🚀 The Ultimate VS Code Extension for Odoo Developers

Boost your Odoo development productivity with intelligent code completion, snippets, validators, and generators.

Version Odoo VS Code

✨ Features

📝 Smart Snippets

40+ Python Snippets for rapid Odoo development:

  • omodel - New Odoo model
  • oinherit - Inherit existing model
  • owizard - Transient wizard model
  • fchar, ftext, fint, ffloat, fbool - Field definitions
  • fm2o, fo2m, fm2m - Relational fields
  • fsel, fsel-state - Selection fields with state workflow
  • @depends, @onchange, @constrains - Decorators
  • ocreate, owrite, ounlink - CRUD overrides
  • And many more!

35+ XML Snippets for views and data:

  • oform, olist, osearch, okanban - Complete views
  • oaction, omenu, omenu-root - Actions and menus
  • oxpath, oinherit-view - View inheritance
  • obutton, ostat - Buttons
  • ocron, oserver-action - Automated actions
  • t-foreach, t-if, t-esc - QWeb templates

🔧 Generators

Module Scaffolder

Create a complete Odoo module structure with one command:

📁 my_module/
├── __init__.py
├── __manifest__.py
├── 📁 models/
│   ├── __init__.py
│   └── my_model.py
├── 📁 views/
│   └── menu_views.xml
├── 📁 security/
│   └── ir.model.access.csv
├── 📁 data/
├── 📁 static/
│   └── 📁 description/
│       └── icon.png
└── 📁 wizard/

Model Generator

  • Create new models with common fields
  • Add fields to existing models
  • Auto-generates with mail.thread and mail.activity.mixin

Security Generator

  • Scans Python models automatically
  • Generates ir.model.access.csv
  • Creates user and manager groups

View Generator

  • Generate Form, List, Search, and Kanban views
  • Detects fields from model definition
  • Creates action and menu items

✅ XML Validator

Real-time validation for Odoo XML files:

  • Detects deprecated attrs attribute (Odoo 17+)
  • Warns about deprecated states attribute
  • Catches empty id attributes
  • Finds duplicate record IDs
  • Validates XML syntax

💡 Intelligent Autocomplete

Python Autocomplete:

  • fields. - All Odoo field types with parameters
  • models. - Model, TransientModel, AbstractModel
  • @api. - All API decorators
  • Common model references (res.partner, sale.order, etc.)

XML Autocomplete:

  • widget="" - All Odoo widgets
  • type="" - Button and field types
  • position="" - XPath positions
  • Common models and field names

🚀 Quick Start

Installation

  1. Download the .vsix file
  2. In VS Code: Ctrl+Shift+P → "Install from VSIX"
  3. Reload VS Code

Commands

Command Shortcut Description
Create Odoo Module Ctrl+Shift+O M Generate complete module
Generate Security Ctrl+Shift+O S Generate access rights
Generate Views Ctrl+Shift+O V Generate views from model
Create Model - Create new Python model
Add Field - Add field to existing model
Validate XML - Validate Odoo XML file

Access all commands: Ctrl+Shift+P → "Odoo:"

📖 Usage Examples

Creating a New Module

  1. Press Ctrl+Shift+O M
  2. Enter module name: inventory_tracking
  3. Enter description: Inventory Tracking System
  4. Enter author name
  5. Enter main model name: inventory.item

Result: Complete module with model, views, security, and menu!

Using Snippets

In a Python file, type:

omodel   → Generates complete model class
fchar    → fields.Char('Name')
fm2o     → fields.Many2one('model', string='Label')
@depends → @api.depends('field') + compute method

In an XML file, type:

oform    → Complete form view
oaction  → Window action
omenu    → Menu item
oxpath   → XPath selector

Generate Security from Models

  1. Open any Python file in your module
  2. Press Ctrl+Shift+O S
  3. Security file with all models is generated!

Generate Views from Model

  1. Open a model Python file
  2. Press Ctrl+Shift+O V
  3. Select which views to generate
  4. Complete view file created!

⚙️ Configuration

Configure in VS Code Settings (Ctrl+,):

{
    "odoo-dev-toolkit.author": "Stevenmarp",
    "odoo-dev-toolkit.defaultOdooVersion": "18.0",
    "odoo-dev-toolkit.defaultLicense": "LGPL-3",
    "odoo-dev-toolkit.autoGenerateSecurity": true,
    "odoo-dev-toolkit.autoGenerateViews": true
}
Setting Default Description
author "" Default author for new modules
defaultOdooVersion "18.0" Default Odoo version
defaultLicense "LGPL-3" Default license
autoGenerateSecurity true Auto-generate security on module create
autoGenerateViews true Auto-generate views on module create

🎯 Supported Odoo Versions

  • ✅ Odoo 18.0
  • ✅ Odoo 17.0
  • ✅ Odoo 16.0
  • ✅ Odoo 15.0
  • ✅ Odoo 14.0

📋 Snippet Reference

Python Snippets

Models

Prefix Description
omodel New Odoo model
oinherit Inherit existing model
owizard Transient wizard
oabstract Abstract model

Fields

Prefix Description
fchar Char field
ftext Text field
fhtml HTML field
fint Integer field
ffloat Float field
fmon Monetary field
fbool Boolean field
fdate Date field
fdatetime Datetime field
fsel Selection field
fsel-state State selection
fbin Binary field
fimg Image field
fm2o Many2one field
fo2m One2many field
fm2m Many2many field
fref Reference field
fcompute Computed field
frelated Related field

Decorators

Prefix Description
@depends Compute with depends
@onchange Onchange method
@constrains Constraint method
@model Model method
@model-create-multi Multi-create decorator

Methods

Prefix Description
ocreate Override create
owrite Override write
ounlink Override unlink
odefault-get Override default_get
oname-get Override name_get
oaction Action method
owiz-action Wizard action
ocron-method Cron method
ocompute Compute method

Other

Prefix Description
osql SQL constraint
oimport Common imports
osuper Super call
oenv Environment access
osearch Search records
oformat-list Format list

XML Snippets

Views

Prefix Description
oform Form view
olist List view
osearch Search view
okanban Kanban view
oinherit-view Inherit view

Actions & Menus

Prefix Description
oaction Window action
omenu Menu item
omenu-root Root menu structure
oserver-action Server action

Elements

Prefix Description
ofield Field element
ofield-widget Field with widget
ofield-invisible Invisible field
obutton Object button
obutton-action Action button
ostat Stat button
ogroup Group container
onotebook Notebook
opage Notebook page
oxpath XPath selector

Data

Prefix Description
orecord Record definition
ocron Cron job
ogroup-security Security group
orule Record rule
odata Noupdate data

QWeb

Prefix Description
t-foreach Foreach loop
t-if If condition
t-esc Escaped output
t-set Set variable

🐛 Known Issues

  • XML validation might show false positives for complex QWeb templates
  • Some snippets may need adjustment for older Odoo versions

📝 Changelog

1.0.0 (2025-01-XX)

  • Initial release
  • 40+ Python snippets
  • 35+ XML snippets
  • Module scaffolder
  • Model generator
  • Security generator
  • View generator
  • XML validator
  • Intelligent autocomplete

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

MIT License - see LICENSE file for details.

👨‍💻 Author

Stevenmarp


⭐ If this extension helps you, please give it a star! ⭐

💖 Support

If you find this extension useful, consider:

  • ⭐ Starring the repository
  • 📝 Writing a review on VS Code Marketplace
  • 🐛 Reporting bugs or suggesting features

Made with ❤️ for the Odoo community

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft