Local development¶
How Odoo runs¶
The wizard asks "How do you want to run Odoo?" and lists the editors installed on your
computer first. Your editor's settings are never changed; only a project folder (.vscode/,
.idea/ or .zed/) is written inside the instance.
If the editor you pick is not installed, the wizard says so and offers:
- Install it now: Zed with its official installer (no password needed); VS Code,
VSCodium and PyCharm with
snap, on systems that have it (asks for your password). It is installed together with Odoo, then opened. - Install it yourself: the wizard shows the download link and waits; choose check again when it's installed, and the install continues.
- Use it anyway (install it later), or choose another way to run Odoo.
odoobuddy open NAME --with EDITOR offers the same when the editor is missing.
| Choice | After the install | Debugging |
|---|---|---|
| VS Code, Cursor, Windsurf, VSCodium | The editor opens and Odoo starts by itself in the terminal panel "Odoo: run NAME" | Run and Debug โ Attach to Odoo (NAME) โ F5, any time |
| PyCharm | PyCharm opens and Odoo starts by itself (Startup Tasks) in the Run window | Stop it (โ ), then click Debug ๐ |
| Zed | Zed opens; start Odoo with Ctrl+Shift+P โ task: spawn โ "Odoo: run NAME" |
Ctrl+Shift+P โ debugger: start โ Attach to Odoo |
| Terminal | odoobuddy run NAME shows live logs; Ctrl+C stops it |
Any editor can still attach |
| Background | Started for you; odoobuddy start / stop / logs NAME |
Any editor can still attach |
First time only
- VS Code family: trust the folder, and click Allow when asked about automatic tasks.
- PyCharm: click Trust Project. If asked for an interpreter, choose Existing โ
~/odoo/NAME/venv/bin/python.
Attach to Odoo¶
Every way of starting Odoo listens for a debugger on a per-instance port (web port + 20000, e.g. 8069 โ 28069). "Attach to Odoo" connects to the running Odoo, so you don't restart it to debug, and it keeps working after Odoo reloads itself when you change Python code. Several instances can be debugged at the same time.
Change editor later¶
odoobuddy open shop # open it again
odoobuddy open shop --with pycharm # switch editor (writes that editor's project files)
If Odoo is already running in the background, open offers to stop it first, because the
editor needs the port.
Where things are¶
~/odoo/shop/
โโโ odoo/
โ โโโ odoo/ โ Odoo Community (one branch, latest commit only)
โ โโโ enterprise/ โ Odoo Enterprise (if chosen)
โโโ custom/
โ โโโ addons/ โ your own modules
โ โโโ <repository>/ โ cloned repositories
โโโ conf/odoo.conf โ configuration
โโโ venv/ โ this instance's Python
โโโ data/filestore/<db>/ โ attachments
โโโ logs/odoo.log โ log when started in the background
โโโ backups/ โ backup zips
โโโ start.sh โ run in a terminal without odoobuddy
โโโ .vscode/ .idea/ or .zed/ โ editor project
addons_path order: odoo/enterprise โ custom/addons โ each repository โ Community.
Several versions side by side¶
Every instance is independent, so Odoo 17, 18, 19 and 20 can run together. Ports are suggested automatically, and every command tells you which instance it acts on:
- the name you type (
odoobuddy logs shop), or - the instance folder you are in, or
- the one chosen with
odoobuddy use shop, or - it asks; it never guesses.