Odoo development is best done from a source install — running Odoo directly from a cloned Git repository rather than a packaged release. This gives you full access to the codebase, lets you easily switch branches, and integrates cleanly with the contribution workflow. This guide walks you through every step from a bare machine to a running Odoo server.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/odoo/documentation/llms.txt
Use this file to discover all available pages before exploring further.
This guide assumes a Linux or macOS environment. Windows developers should use WSL2 (Windows Subsystem for Linux) with Ubuntu for the best experience.
Prerequisites
Before cloning the repositories, make sure the following are installed on your system:| Tool | Minimum version | Purpose |
|---|---|---|
| Git | 2.x | Cloning and version control |
| Python | 3.10+ | Running the Odoo server |
| pip | latest | Installing Python packages |
| PostgreSQL | 12+ | Database backend |
| Node.js | 16+ | Asset bundling (Less/CSS) |
| wkhtmltopdf | 0.12.5 | PDF report rendering |
Installation Steps
sudo apt-get update
sudo apt-get install -y git python3 python3-pip python3-venv \
postgresql postgresql-contrib \
nodejs npm wkhtmltopdf \
libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \
libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev libharfbuzz-dev \
libfribidi-dev libxcb1-dev
mkdir -p $HOME/src
cd $HOME/src
# Core Odoo (community edition)
git clone git@github.com:odoo/odoo.git
# Enterprise modules (requires Odoo partner/employee access)
git clone git@github.com:odoo/enterprise.git
If you encounter an
AttributeError: module '<MODULE_NAME>' has no attribute '<ATTRIBUTE>' error later, try reinstalling the affected package:Odoo will create the
rd-demo database on first run, install base modules, and start listening on port 8069.Open your browser at http://localhost:8069/
Key odoo-bin Arguments
| Argument | Description |
|---|---|
-d <database> | The PostgreSQL database to use |
--addons-path <dirs> | Comma-separated list of directories scanned for modules |
-i <modules> | Install modules before starting (comma-separated) |
-u <modules> | Update modules before starting (comma-separated) |
--limit-time-cpu <n> | Max CPU seconds per request (useful when debugging) |
--limit-time-real <n> | Max wall-clock seconds per request |
--test-enable | Run tests after module installation |
--test-tags <tags> | Filter which tests to run |
--log-sql | Log every SQL query (useful for performance analysis) |
Common startup commands
Setting Up the Tutorials Repository
If you are following the Server Framework 101 tutorial, configure Git to push your work to your own fork:- Link with your fork
- Odoo employees (odoo-dev)
- Visit github.com/odoo/tutorials and click Fork.
- Add your fork as a remote:
Useful Git Commands
Switch branches (keep both repos in sync)
When switching Odoo versions, bothodoo and enterprise must be on the same branch:
Fetch and rebase
Recommended Editor Setup
Most Odoo developers use VSCode, VSCodium, PyCharm, or Sublime Text. Configure your linter with these Odoo-specific exceptions: Python (PEP8 exceptions):E501— line too longE301— expected 1 blank line, found 0E302— expected 2 blank lines, found 1
Python Debugger
For debugging server-side Python code, useipdb or the built-in pdb:
ipdb / pdb command reference
ipdb / pdb command reference
| Command | Description |
|---|---|
h | Show help |
n | Execute next line |
s | Step into function call |
c | Continue execution |
u / d | Move up/down the call stack |
pp <expr> | Pretty-print an expression |
w | Print the current stack trace |
q | Quit the debugger |
Database Administration
Connect to your development database withpsql:
- Host:
/var/run/postgresql - Port:
5432 - Username: your system username