Blog
Odoo modules: get the code and database in step
By The Ofleet team11 min read
Contents
The Python file had the new field. PostgreSQL didn't. In our November 24, 2026 test on Odoo 18 Community, installing and updating Odoo modules meant doing two separate jobs: deploying the code, then applying it to a particular database with -i or -u. Check the version, dependencies and addon paths before that second job, and keep a matching backup ready for rollback.
Deploying code leaves the database schema unchanged#
An addon lives on disk, but its installation status belongs to a database. Our disposable module_probe addon makes the distinction easy to see. Its first revision adds probe_label to contacts. The next revision adds probe_note, which we copied into the container before running this read-only query in psql, connected to the test database modules_lab:
SELECT count(*) AS probe_note_columns_before_update
FROM information_schema.columns
WHERE table_name = 'res_partner'
AND column_name = 'probe_note';The result was 0. Copying the Python file hadn't created a column. After a targeted update with -u module_probe, querying the field names returned:
column_name
-------------
probe_label
probe_note
(2 rows)Creating a contact through the ORM with a value in probe_note then worked. That's a useful check: the deployed model, database schema and application behavior agree. Finding the addon folder on disk tells you much less.
The Odoo 18 command-line reference (nouvel onglet) separates installation with -i from updating with -u; both target the database selected with -d. If your server runs several databases, each has its own installation state. Making code available to the server doesn't automatically install it in all of them.
Choose Odoo modules by source and dependency tree#
An Odoo app is a module marked as an application; a technical addon may extend an existing model without providing a standalone app. The manifest's application field records that distinction. A catalog card is therefore a poor substitute for reading what the addon actually requires.
| Source | What you obtain | What I would check first |
|---|---|---|
| Standard Community | Addons shipped with Odoo Community | Whether the needed behavior is already available |
| Standard Enterprise | Enterprise addons alongside Community | Access to the code and a valid Enterprise subscription |
| Odoo Apps Store | An addon from its publisher | Target version, license, dependencies and update instructions |
| OCA or your own project | Community code or custom code | Recorded commit, tests and availability of dependencies |
Method: sources and manifest fields checked on November 24, 2026 against the Odoo 18 module reference (nouvel onglet) and OCA repositories. This classifies code sources, not addon quality or certification.
I'd open depends before looking at screenshots. An addon that introduces an application your project doesn't currently use changes the scope of the installation. Odoo installs required module dependencies before installing the requested addon, so those dependencies belong in the decision, not in a surprise discovered during deployment.
Community and Enterprise are editions with different licenses (nouvel onglet). Neither is another name for the Apps Store. A third-party addon may depend on Enterprise code, and appearing in a marketplace doesn't make it compatible with Community. The purchase price and the license attached to that addon don't resolve its technical dependencies.
Record the technical name as well. Here it is module_probe, the folder name passed to the CLI. The display name may be translated or changed by the publisher. Your deployment commands need an identifier that points to the code you actually reviewed.
Match the OCA branch to the Odoo major version#
An Odoo 18 installation needs addons ported to Odoo 18, including their dependencies. In OCA repositories, the 18.0 branch and a manifest version such as 18.0.1.0.0 are useful starting points. Downloading the 17.0 branch today doesn't turn it into an Odoo 18 addon.
The OCA migration guide for 18.0 (nouvel onglet) covers porting work and the corresponding version change. Editing only the manifest prefix removes a warning sign while leaving the old views, Python calls and dependencies in place. I wouldn't use a successful version-string edit as evidence of compatibility.
Look inside the target branch for the particular addon you need. One OCA repository can hold many addons, and a branch can exist before every addon has been ported. Follow the dependency chain until you can identify compatible code for everything your project will load.
Keep the selected commit, too. “Latest” won't tell another developer what to restore after the next revision breaks a report. A small deployment inventory can record the Odoo build and edition, addon commits and Python dependencies. That is enough to answer a much better question than “Where did we download this?”: “Can we rebuild the installation we tested?”
A major Odoo upgrade involves porting addons and migrating the database. Those are separate tasks. The -u example below runs within Odoo 18; it doesn't convert an Odoo 18 database into an Odoo 19 or 20 database.
Point addons_path at the parent directory#
addons_path lists directories containing addon folders. For our test module, the layout is:
/mnt/extra-addons/
└── module_probe/
├── __init__.py
├── __manifest__.py
└── models.pyThe test configuration at /etc/odoo/odoo.conf includes addons_path = /mnt/extra-addons. The Odoo package supplies its standard paths. For your own installation, preserve the paths it already needs and add the directory containing your custom addons. Replacing the whole setting with a copied example can hide code the project was using.
There is a good public example in an Odoo forum question about addon directories (nouvel onglet). On April 17, 2020, an Odoo 13 command using custom-addons produced the path 'custom-addons' is not a valid addons directory. The accepted answer shows absolute paths to addon repositories. A January 19, 2021 reply describes another cause: an empty directory with no module manifest. The thread gives you things to inspect, not proof that every relative path is invalid.
To reproduce our test on an existing Odoo 18 Community installation, create the three files above. Put from . import models in __init__.py. Use this manifest:
{
'name': 'Module probe',
'version': '18.0.1.0.0',
'license': 'LGPL-3',
'depends': ['base'],
'application': False,
'installable': True,
}And this models.py:
from odoo import fields, models
class Partner(models.Model):
_inherit = 'res.partner'
probe_label = fields.Char()Run the following as the Odoo operating-system user in its Python environment. Replace the configuration path and database name with your test values. The configuration must already provide working PostgreSQL access. Stop other Odoo processes using that database before running the command, which installs the addon and then exits:
odoo -c /etc/odoo/odoo.conf -d modules_lab -i module_probe \
--without-demo=all --stop-after-init --no-http \
--workers=0 --max-cron-threads=0Our container provides an odoo executable. A source installation uses the project's Python interpreter and odoo-bin instead. Keep database credentials in the existing protected configuration rather than adding them to shell history along with an otherwise harmless-looking install command.
Check the Apps filter before reinstalling anything#
A technical addon with application: False can be hidden by the Apps filter, including the test addon above. After deploying code and restarting Odoo, enable developer mode, update the apps list, remove that filter and search for the technical name. Refreshing the catalog makes available modules known to the database; it doesn't apply an update to an installed addon.
If the addon is still missing, read the startup log's addons paths entry. It shows what the running process is actually scanning. The service may have been launched with -c pointing to a different configuration from the one you just edited. Also check that its operating-system user can traverse the directories and read the files.
Missing Odoo dependencies and missing Python packages are different problems. An Odoo dependency needs the matching addon. A Python dependency needs to be available in the environment used by the Odoo process. The manifest's external_dependencies field checks for Python imports or executable binaries; it doesn't install them for you.
I'd make those Python packages and Linux libraries part of the versioned environment build. An interactive package installation inside a running container disappears when that container is replaced. Our Odoo Docker deployment and restore walkthrough explains how to keep the image, code and persistent data separate.
Run -u against a test copy before production#
A module update applies deployed code to the selected database and can change its schema or reload module data. I would first prepare a test copy and a matching restore set, rather than use production's Upgrade button as a way to find out what the addon changes.
Keep that copy disconnected from external services, with scheduled actions disabled while you prepare it, so that testing an addon cannot accidentally send messages to customers or reach the production payment service. A copy of real data only needs the personal information and user access required for the test. Dummy contacts are enough here. Leave production data out of this field test.
In models.py, add probe_note = fields.Text() inside the Partner class, alongside probe_label. Change the manifest version to 18.0.1.0.1, then deploy those files to the same location. With other Odoo processes stopped on that database, run this Odoo 18 command:
odoo -c /etc/odoo/odoo.conf -d modules_lab -u module_probe \
--stop-after-init --no-http --workers=0 --max-cron-threads=0Our log includes module module_probe: creating or updating database tables. The addon remains installed, its recorded version becomes 18.0.1.0.1, and PostgreSQL now has probe_note. Creating a contact through the ORM with a value in that field succeeds. That's a short technical acceptance test with an observable result.
For a real addon, test the workflow it changes: the inherited view, generated report or external integration. Check the command's exit status and error log first, then run that workflow with the relevant user permissions. A server that starts successfully hasn't demonstrated what an ordinary user can do.

Before updating production, stop writes and back up PostgreSQL together with its filestore. Keep the corresponding code commits and configuration. Checking out old code won't undo data transformations already applied to the database. Uninstalling an addon may delete its data, so I wouldn't treat Uninstall as the reverse of Upgrade.
Online, Odoo.sh and your own server have different boundaries#
Needing a custom server addon rules out Odoo Online, but it doesn't automatically mean running your own Linux server. The official Odoo.sh project creation guide (nouvel onglet) describes adding community or custom addons to a GitHub branch and having the platform detect them.
| Hosting | Third-party server code | Where you work |
|---|---|---|
| Odoo Online | No custom server addons | Features available within Online |
| Odoo.sh | Community and custom addons | Project Git repository and test branches |
| Your own server | Code you deploy | Python environment, addon paths and database access |
Method: hosting boundaries checked in the Odoo 18 documentation on November 24, 2026. This table concerns server addons, not customization features that run without custom server code.
If Online already covers the requirement without that addon, I would stay there. Moving the whole application for code you don't need creates another operating responsibility. When the custom code is necessary, compare Odoo hosting options around the way you plan to test and ship it, rather than around the addon download alone.
Make the next installation reproducible#
Start with a clean test database, install the selected dependencies, then rehearse the update on a representative copy. You will know where the addon enters the project, what it changes and which earlier state you can restore. That's a much better starting point than an addon folder nobody can tie to a commit.
Test method: Odoo 18 Community 18.0-20261112 and PostgreSQL 16, November 24, 2026, in disposable containers with no production data or published ports. Installation, column creation and an ORM write were checked. No third-party addon, browser workflow, Enterprise deployment, Online or Odoo.sh environment was tested. The commands target this Odoo 18 setup, not a major-version migration.
You can also try Ofleet to run your code on a separate instance. The project's Git code and adjacent Test and Production instances let you keep that validation step alongside the instance you use.
Try Ofleet for free!
€150 credit, no obligation.
Start my trialNo obligation
Read next
odoohostingOdoo custom module: build and test it on Odoo 20
Build an Odoo custom module on Community 20: model, views, ir.access.csv and non-admin tests. Install it on a disposable database, then prepare a safe update.November 12, 20268 min readBy The Ofleet teamRead article
odoohostingOdoo server maintenance: tasks your team can own
Own your Odoo server maintenance: assign monitoring and backup tasks, test an isolated restore, and record evidence before the next production incident.November 5, 202610 min readBy The Ofleet teamRead article
odoohostingOdoo AWS: deploy on EC2 and budget for recovery
Odoo AWS deployment on EC2: choose PostgreSQL or RDS, protect internal ports, pair database and filestore backups, and calculate a dated monthly budget.November 5, 20268 min readBy The Ofleet teamRead article