odoo-addons-path detects common Odoo project layouts and builds a correctly ordered addons_path, so developers no longer assemble it by hand.
Managing the addons_path
setting in Odoo projects looks simple until you maintain several repositories, submodules and more. Each project layout organizes addons in its own way, and the order of the directories matters: a misplaced folder can silently override a module or load the wrong custom module.
odoo-addons-path
removes that burden. It detects your project layout and assembles the final addons_path in the right order, so developers no longer configure it by hand and risk mistakes.
What Is It?
odoo-addons-path is a command-line tool that does one job:
- Auto-detects common Odoo project layouts: Camptocamp, Doodba, Odoo.sh and Trobz
- Builds a correct, ordered, ready-to-use
addons_path - Applies the same detection logic to every layout through the Chain of Responsibility pattern (read more about the pattern )
It focuses on one thing and does it well: producing a reliable, predictable addons_path for any Odoo codebase.
Why We Built It
There is no single standard layout for Odoo projects. Teams adopt different structures, for example:
Trobz
├── odoo/ # Odoo core
├── addons/ # Third-party repos
└── project/ # Custom modules
Doodba
odoo/custom/src/
├── odoo/ # Odoo core
├── private/ # Custom modules
└── submodule/ # Third-party repos
Odoo.sh
├── odoo/ # Odoo core
├── enterprise/
├── themes/
└── user/ # Submodules
Because each layout has to be read differently, building the addons_path by hand is tedious and error-prone. odoo-addons-path was created to standardize the process across common layouts.
How to Use It
Quick Start
Inside your Odoo project directory, run:
odoo-addons-path
The tool outputs a ready-to-use addons_path. If the project follows one of the supported layouts, detection works immediately. Supported out of the box:
- Camptocamp (both legacy and new layouts)
- Doodba (Docker-based development)
- Odoo.sh (Odoo’s official hosting platform)
- Trobz
Add --verbose to see how directories are categorized.
Custom Paths
You can override detection with --addons-dir, which accepts multiple entries and glob patterns.
Version-specific addon discovery:
odoo-addons-path --addons-dir "./oca/*/18.0"
Multiple repository directories:
odoo-addons-path --addons-dir "./oca/*/18.0,./custom"
You can also set the codebase path with an environment variable:
export CODEBASE=/path/to/project
odoo-addons-path
Does the Order of Directories Matter?
Yes. The tool ensures that:
- Odoo’s own modules come first, so they are not overridden by mistake.
odoo/addonsandodoo/odoo/addonsare always at the start of the result. - Directories you specify keep their order. Paths passed with
--addons-dirstay in the order you give, so you can prioritize repositories. This is especially important when a project needs a specific addons directory to take priority. - Auto-detected directories are sorted alphabetically, which keeps the behavior consistent and predictable.
Conclusion
odoo-addons-path removes the manual work, and the hidden pitfalls, of building Odoo’s addons_path. Whether you work with a standard project layout or a custom structure, the tool detects your addon directories and orders them correctly: Odoo core modules always come first, and you can still prioritize repositories when needed.
Give it a try:
uv tool install odoo-addons-path
odoo-addons-path /path/to/your/project