| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 50 |
| Technical Name |
odoocraft_autoupgrade_modules |
| License | AGPL-3 |
| Versions | 16.0 17.0 18.0 19.0 |
Auto-Upgrade Modules
Bump the version. Restart. Done.
No more forgotten --update flags. Automatic module upgrades on every restart.
The Problem Every Developer Knows
You updated your module — added a new field, changed a view, ran a migration script.
You restart Odoo and… nothing. The migration didn't run. The field isn't in the database.
The UI looks wrong. You spent 10 minutes debugging before realizing you forgot to pass
--update=my_module.
In Docker environments it gets worse: the restart script doesn't include
-u, the CI pipeline doesn't know which modules changed, and teams
rely on tribal knowledge to remember which modules need manual updating.
This module watches the version field in every installed module's
__manifest__.py. On each server start, if the on-disk version doesn't
match what's stored in the database, the module is automatically queued for upgrade —
with zero manual intervention.
How It Works
__manifest__.pyIncrement the version field as part of your normal development workflow.
'version': '19.0.1.2.0', # was 19.0.1.1.0
No extra flags, no additional scripts, no manual steps.
Before Odoo loads the registry, the module compares on-disk versions against
ir.module.module and marks changed modules as
to upgrade.
All migration scripts execute, views refresh, field changes apply — exactly as if you had passed
--update=my_module.
Key Features
- Detects version changes in all installed custom modules
- Works at server startup — before any HTTP request is served
- Compatible with Docker, Kubernetes, and any deployment pipeline
- Handles multi-database setups (each DB checked independently)
- Safe: if the database isn't initialized yet, startup proceeds normally
- Detailed startup log: shows exactly which modules were queued
- Works with
PreforkServer(production) andThreadedServer(dev) - Zero dependencies beyond Odoo
base - Enabled/disabled via a single config flag — no code changes needed
- Module itself auto-upgrades when its own version changes
- No UI or views — purely server-side, no performance overhead
Who Is This For
Development teams
Stop wasting time restarting Odoo twice because you forgot -u.
Version your modules as you build them and let restarts handle upgrades automatically.
DevOps & Docker deployments
In containerized environments, your entrypoint command is usually a fixed
odoo --config /etc/odoo/odoo.conf. This module makes that command
smart enough to upgrade modules on its own whenever code changes land.
CI/CD pipelines
Remove the need to detect which modules changed between deployments. Just bump versions as part of your release process and let Odoo handle the rest on startup.
Odoo partners managing multiple client instances
Deploy a new version of your custom module across multiple client databases. All instances self-upgrade on the next restart without any per-instance manual commands.
Configuration
Two lines in odoo.conf. That's it.
Add the following to your odoo.conf:
[options] server_wide_modules = web,odoocraft_autoupgrade_modules trigger_update_via_version = True
The server_wide_modules line ensures the module is loaded at server startup
(before any database is initialized). The trigger_update_via_version flag
acts as a kill-switch — set it to False to disable auto-upgrade without
uninstalling the module.
Docker example — your docker-compose.yml:
services:
web:
image: odoo:19.0
volumes:
- ./my_modules:/mnt/extra-addons
- ./odoo.conf:/etc/odoo/odoo.conf
command: odoo --config /etc/odoo/odoo.conf
No extra flags needed. The module handles the rest on each restart.
Screenshots
Step 1 — Bump the version in the manifest
Step 2 — Restart the server
Step 3 — Upgrade runs automatically
Step 4 — Done. Module is up to date.
Support
Have a question or found an issue? We respond quickly.
Please include your Odoo version, server type (threaded / prefork / Docker),
and the relevant section of your odoo.conf.
Please log in to comment on this module