Skip to main content

Modules

Modules are Odoo's unit of functionality. Antelao shows you what each database has installed, and lets you install, update, disable and uninstall them without opening Odoo's own interface.

Where to look​

Databases hang off their instance in the console: open the instance, then a database, then Modules. Each module has a detail page showing its version, state, and where it came from - Odoo's own addons, Enterprise addons, or one of the instance's Git repositories.

The list opens filtered to custom modules only. On a database without custom modules the table is empty and the toggle says how many of Odoo's own modules it hides; turn it off to list them.
Remote or localagainst pelmo
$ ohm instance database modules --instance fanes

How much custom code is actually here​

The modules tab and a module's own page report the lines of code in your custom modules, counted on request with Count again.

It answers a question that otherwise gets guessed at when someone asks how much bespoke work an instance is carrying - before a version upgrade, or when quoting maintenance on a system you did not build.

Installing and updating​

Remote or localagainst pelmo
$ ohm instance modules install --instance fanes

Installing and updating are background jobs. They take an exclusive lock on the instance, so nothing else runs against it while Odoo's registry is being rebuilt.

Updating a Git-backed module fetches the repository, pins the retrieved commit, and rebuilds. See Git addons for why the commit rather than the branch is what gets recorded.

The Odoo Community and Enterprise addons themselves - as opposed to your own modules - are installed and updated with their own command:

Remote or localagainst pelmo
$ ohm instance odoo install --instance fanes --latest

Without --latest it installs or updates to the versions the instance is pinned to.

The order modules are handed to Odoo​

Custom modules drag into an explicit module order, with the same grips as the firewall rules. That order is the sequence a bulk install or update hands the modules to Odoo in, and it is persisted on the instance configuration like any other setting - so it is saved, applied and recorded as a revision rather than being a property of the page you are looking at.

It matters when one module has to be in place before another can load.

Several at once​

Rows multi-select with Ctrl-click and Shift-click. Upgrade on a selection runs as one job rather than one per module, which is both faster and safer: Odoo's registry is rebuilt once. Reinstall is offered for the instance's own modules.

Disabling and uninstalling​

Disabling counts as much as uninstalling

In Odoo, disabling a module can remove data belonging to that module, exactly as uninstalling can, and re-enabling does not bring it back.

Take a backup of the database first. Not a backup of the instance later, and not "there is a nightly one": a backup of this database, before this change.

Antelao asks for explicit confirmation for both, and the confirmation is not a formality.

Database groups​

Databases can be organised into groups, which is how a hosting company keeps one customer's databases together across instances. A database's Groups page lists the groups it belongs to, and a group's own page lists its databases and the modules across them.

The practical use is answering "which of my customers are on this module version" without walking every database by hand.