Skip to content

Odoo Sources

Manage local Odoo Community and Enterprise source checkouts.

Modules:

Name Description
download

Download (or update) Odoo Community and Enterprise source code.

show

List locally available Odoo source checkouts.

update

Update Odoo Community and Enterprise source checkouts.


The download and update commands share a common sources directory that holds one subdirectory per Odoo version:

<sources_dir>/
├── 17.0/
│   ├── community/     ← git@github.com:odoo/odoo.git
│   └── enterprise/    ← git@github.com:odoo/enterprise.git
└── 19.0/
    └── community/

The sources directory is configured once in ~/.oops.yaml and shared across the team:

odoo:
  sources_dir: ~/odoo-sources

oops odoo download

Download (or update) Odoo Community and Enterprise source code.

Clones Community and Enterprise from GitHub using SSH into:

<sources_dir>/<version>/community
<sources_dir>/<version>/enterprise

The sources directory is read from odoo.sources_dir in ~/.oops.yaml.

If a directory already exists the clone step is skipped. Pass --update to pull the latest changes instead.

Usage:

oops odoo download [OPTIONS] VERSION

Options:

Name Type Description Default
--update boolean Pull latest changes if repos already exist. False
--enterprise / --no-enterprise boolean Include or exclude Enterprise sources. True
--help boolean Show this message and exit. False

Examples:

Clone Community and Enterprise for Odoo 19 (Enterprise is included by default):

oops odoo download 19.0

The short form 19 is also accepted and normalised to 19.0:

oops odoo download 19

Clone Community only, skipping Enterprise:

oops odoo download 19.0 --no-enterprise

Update existing checkouts to the latest commit:

oops odoo download 19.0 --update
oops odoo download 19.0 --update --no-enterprise

oops odoo show

List locally available Odoo source checkouts.

Scans the sources directory for version folders and shows, for each version, the current commit hash and author date for Community and Enterprise.

The sources directory is configured via odoo.sources_dir in ~/.oops.yaml.

Usage:

oops odoo show [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

Examples:

List all locally available Odoo source checkouts:

oops odoo show

Example output:

| Version | Community                             | Enterprise                            |
|---------|---------------------------------------|---------------------------------------|
| 17.0    | a1b2c3d4  2024-11-15 10:22:31 +0100  | e5f6g7h8  2024-11-14 18:03:12 +0100  |
| 19.0    | 9i0j1k2l  2025-01-08 09:11:44 +0100  | —                                     |

A in the Enterprise column means the Enterprise checkout is not present (run oops odoo download <version> to add it — Enterprise is included by default).


oops odoo update

Update Odoo Community and Enterprise source checkouts.

Operates on repositories previously cloned by oops-odoo-download into:

<base_dir>/<version>/community
<base_dir>/<version>/enterprise

The sources directory is read from odoo.sources_dir in ~/.oops.yaml.

Without --date, fetches and checks out the latest commit on the branch.

With --date YYYY-MM-DD, fetches history back to that date and checks out the last commit that existed at or before midnight of that day, leaving the working tree in a detached-HEAD state at the chosen snapshot.

Pass --enterprise to also update the Enterprise checkout.

Usage:

oops odoo update [OPTIONS] VERSION

Options:

Name Type Description Default
--date datetime (%Y-%m-%d) Checkout the last commit at or before this date. None
--enterprise / --no-enterprise boolean Include or exclude Enterprise in the update. True
--help boolean Show this message and exit. False

Examples:

Pull the latest commit on the branch (Enterprise included by default):

oops odoo update 19.0

Update Community only, skipping Enterprise:

oops odoo update 19.0 --no-enterprise

Checkout the state of the codebase as of a given date (detached HEAD):

oops odoo update 19.0 --date 2024-06-01
oops odoo update 19.0 --date 2024-06-01 --no-enterprise

Note

--date uses a shallow fetch (git fetch --shallow-since). The first call for a given date may take a moment to download history.