Skip to main content

Git-backed addons

Custom modules come from Git repositories rather than being copied onto the server. An instance lists the repositories it uses, and Antelao clones them into the instance's addons tree.

Adding a repository

In the Web UI, the instance's Git tab. In the creation wizard it is step three. Each repository needs its URL, the branch or tag to track, and credentials if it is private.

Credentials are stored as secrets: they are write-only through the API, never returned by a read, and never written into a job payload or log.

Revisions are pinned, not floating

When a module is added or updated, the job fetches immediately and records the exact commit it retrieved. The instance's configuration then names that commit rather than a branch tip.

This is the difference between "we run branch main" and "we run a1b2c3d". Only the second one lets you say what is deployed, reproduce it later, or notice that a rebuild changed something.

The Revisions tab shows what each repository is pinned to and what has moved upstream since.

Updating

Updating a module is an explicit action that fetches, re-pins and rebuilds. It is a job like any other, so it queues, logs and can fail visibly rather than silently leaving a half-updated tree.

Modules

Remote or localagainst prod-1
# odoocli instance modules select --instance acme
Remote or localagainst prod-1
# odoocli instance modules install --instance acme

Selecting decides which modules the instance carries. Installing is the Odoo-level action of installing them into a database.

Disabling a module can lose data

In Odoo, disabling a module is not a lighter version of uninstalling it. Both can remove data that belongs to that module, and neither is reversible by re-enabling. Back the database up first.

A note on cloning

Clones are shallow and shell out to the git command-line client rather than using an in-process Git library. That is not a stylistic choice: the library in question ignores the shallow-depth request against GitHub over HTTPS, and a full clone of a large addons repository is slow enough to matter on every rebuild.

Odoo version and addons paths

Odoo 16.0 and earlier reject an empty addons path, while 17.0 and later tolerate it. A fresh instance on 15.0 or 16.0 therefore omits the addons path entirely until a module exists, rather than passing an empty one and failing to initialise a database.

You do not need to do anything about this; it is here because the resulting configuration looks inconsistent between versions and it is not a fault.