Duration: 26:18
🧾 Analytical Summary
🛠️ The Problem
Ham Maharus and Florian Gandaloeshe present Odoo LS (Odoo Language Server), addressing a fundamental developer pain point: standard IDEs don't understand Odoo's unique coding patterns. Imports don't resolve, dynamic features like self.env and compute methods go unrecognized, and ORM magic remains invisible to traditional language servers.
💡 What is Odoo LS?
Odoo LS implements Microsoft's Language Server Protocol (LSP)—a standard externalizing language processing from IDEs, keeping them performant while providing IDE-agnostic functionality. One server works across VS Code, PyCharm, Neovim, Zed, and other editors supporting LSP.
Currently available on PyCharm (free version as of 2024), VS Code, Neovim, and Zed, with more platforms possible via community requests.
🎯 Why Custom Implementation?
Extending existing Python language servers (like Pyright) proved incompatible with Odoo's architecture:
- Project-wide context required: Odoo models span multiple modules, requiring cross-module analysis
- Multi-language support: XML, CSV, Python all interconnect
- Odoo-specific patterns: Manifest files, dynamic imports,
self.envconstructs, string-based model references - Inheritance complexity: Odoo inheritance differs from Python inheritance
Standard linters expect static typing and single-file context—Odoo operates dynamically across entire projects.
⚙️ Technology Stack
Initially prototyped in Python, performance issues led to Rust implementation. Started with RustPython parser, migrated to Rust's native Python parser for better performance. Rust provides speed necessary for real-time IDE responsiveness.
🔄 How It Works
Build Internal Database: Parse Odoo installation, add-ons, custom modules, dependencies. Handle Odoo inheritance, track all XML IDs and CSV data, creating complete project representation.
Generate Diagnostics: Identify errors/warnings like using non-existent modules, implementing models not in dependencies, catching issues before runtime.
Respond to Requests: Handle lifecycle messages (create, update, rename) and provide core features—hover information, go-to-definition, autocompletion—across all project files, even non-Odoo Python code.
⚙️ Configuration
Hierarchical TOML format: Shareable, IDE-independent configuration supporting complex workloads. Create profiles, inherit settings, reuse across projects.
Auto-detection: Opening workspace on Odoo folder with add-ons automatically works without manual config.
Templates: Create version-agnostic profiles working across Odoo 17, 18, 19+.
CLI Mode: Run as static analysis tool generating diagnostic output files—integrating with CI/CD pipelines and internal validation systems.
🎨 Key Features
Import Resolution: All imports resolve correctly, even across modules.
Model Navigation: Ctrl+click on model names (even string references) jumps to definition. Hover shows inheritance chain and field details.
Compute & Related Fields: Navigate to compute functions across files. Related field targets resolve even when defined in different modules.
Recordset Intelligence: Autocomplete shows all fields and methods available on recordsets.
Search/Browse Assistance: self.env['model.name'] autocomplete lists all models, indicates missing dependencies.
Implementation Lookup: View all implementations of inherited models within manifest scope.
Error Detection: Identifies non-existent models, typos in field/model references.
XML Support: Recognizes models, detects field errors, validates XML ID references (including CSV-defined IDs).
No-Error Comments: Silence specific errors at code, function, class, or file scope using # odoools: disable=ERROR_CODE.
📊 Diagnostics & Filtering
Configure diagnostic severity (error/warning), disable specific codes, filter by file patterns. Full control over what warnings/errors appear where—essential for large codebases with legacy technical debt.
🎯 Custom Formatters
Debug mode + custom formatters setting enables beautiful object visualization in browser devtools—replacing cryptic proxy objects with readable field/value displays.
🚀 Roadmap
- More diagnostics based on community feedback
- Generic diagnostic framework allowing custom error detection
- Additional IDE client implementations
- JavaScript feature support
- Enhanced CSV handling beyond data presentation
- Performance improvements (memory, speed)
- Containerization for resource-constrained environments
🔒 Privacy & Open Source
Fully local—no data leaves your machine except optional crash reports (which show affected code snippet before sending). Completely open source with GitHub repositories for each component (odoo-ls core, VS Code plugin, PyCharm plugin, Neovim/Zed configs).
🧠 Viewpoint: Odoo Perspective
⚠️ Disclaimer: AI-generated creative perspective inspired by Odoo's vision.
Odoo LS represents developer experience investment most companies neglect. Building a language server from scratch in Rust demonstrates commitment to tooling quality. When developers spend hours navigating code, every second saved compounds across thousands of developers globally. The open-source approach invites community contribution while maintaining our standards—and the fact it works across all major IDEs prevents vendor lock-in at the tooling level, mirroring our platform philosophy.
🏢 Viewpoint: Competitors (SAP / Microsoft / Others)
⚠️ Disclaimer: AI-generated fictional commentary. Not an official corporate statement.
Impressive engineering, though niche utility. Most enterprise development occurs in standard languages where mature language servers exist. The custom implementation requirement reflects Odoo's non-standard architecture—powerful for flexibility, costly for tooling. Rust performance is appropriate, but maintenance burden for community-driven tooling can be challenging long-term without dedicated team commitment. Still, developer productivity tools often determine platform adoption among technical audiences, making this strategically sound investment.
Disclaimer: This article contains AI-generated summaries and fictionalized commentaries for illustrative purposes. Viewpoints labeled as "Odoo Perspective" or "Competitors" are simulated and do not represent any real statements or positions. All product names and trademarks belong to their respective owners.