Professional command-line tool for automating Odoo database upgrades using OCA's OpenUpgrade framework. Seamlessly upgrade your Odoo databases from version 10.0 through 19.0 with a single command.
- π Automated Incremental Upgrades: Automatically handles multi-step upgrades
- π¦ Multiple Source Formats: Supports both
.zipand.dumpdatabase files - π Remote Downloads: Download databases directly from URLs
- π Custom Addons Support: Include custom Odoo modules during the upgrade process
- π³ Docker-Based: Uses containerized environments for safe, isolated upgrades
- π Rich CLI Output: Beautiful progress bars and status indicators using Rich library
- π Detailed Logging: Optional verbose mode and log file support
- β Validation: Pre-flight checks for source accessibility and Docker availability
- Python: 3.9 or higher
- Docker: Docker Engine with Docker Compose (v2) or docker-compose (v1)
- Operating System: Linux, macOS, or Windows (with WSL2 for best results)
- Disk Space: Minimum 5GB free space for Docker volumes and temporary files
pip install odooupgradergit clone https://github.com/fasilwdr/OdooUpgrader.git
cd OdooUpgrader
pip install -e .Upgrade a local database file to version 16.0:
odooupgrader --source /path/to/database.zip --version 16.0odooupgrader --source https://example.com/database.dump --version 17.0Include custom addons from a local directory:
odooupgrader --source /path/to/database.zip --version 16.0 --extra-addons /path/to/custom_addonsInclude custom addons from a local ZIP file:
odooupgrader --source /path/to/database.zip --version 16.0 --extra-addons /path/to/addons.zipInclude custom addons from a remote ZIP URL:
odooupgrader --source /path/to/database.zip --version 16.0 --extra-addons https://example.com/custom_addons.zipodooupgrader --source /path/to/database.zip --version 16.0 --postgres-version 15odooupgrader --source /path/to/database.zip --version 18.0 --verboseodooupgrader --source /path/to/database.zip --version 15.0 --log-file upgrade.logodooupgrader \
--source https://example.com/database.dump \
--version 17.0 \
--extra-addons https://example.com/custom_modules.zip \
--postgres-version 15 \
--verbose \
--log-file upgrade.log| Option | Required | Description |
|---|---|---|
--source |
β | Path to local .zip/.dump file or URL to download |
--version |
β | Target Odoo version (10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0) |
--extra-addons |
β | Custom addons location: local folder, local .zip file, or URL to .zip file |
--postgres-version |
β | PostgreSQL version for the database container (default: 13) |
--verbose |
β | Enable verbose logging output |
--log-file |
β | Path to save detailed log file |
- Validation: Checks if source file/URL is accessible and Docker is available
- Environment Setup: Creates necessary directories and PostgreSQL container
- Source Processing: Downloads (if URL) and extracts the database
- Addons Processing: Downloads and extracts custom addons (if provided)
- Database Restoration: Restores database and filestore to PostgreSQL
- Version Detection: Determines current database version
- Incremental Upgrades: Runs OpenUpgrade for each version step with custom addons
- Package Creation: Creates final
.zipwith upgraded database and filestore
After successful upgrade, you'll find in the output directory:
output/
βββ upgraded.zip # Final packaged database (ready to restore)
βββ odoo.log # Upgrade process logs
graph TD
A[Input Source] --> B{File Type?}
B -->|ZIP| C[Extract ZIP]
B -->|DUMP| D[Copy DUMP]
C --> E[Database Container]
D --> E
E --> F[Restore Database]
F --> G[Get Current Version]
G --> H{Current < Target?}
H -->|Yes| I[Build Upgrade Container]
I --> J{Extra Addons ?}
J -->|Yes| K[Mount Custom Addons]
J -->|No| L[Run OpenUpgrade]
K --> L
L --> M[Update Database]
M --> N[Get New Version]
N --> H
H -->|No| O[Create Final Package]
O --> P[Cleanup]
The --extra-addons option allows you to include custom Odoo modules during the upgrade process. This is essential when your database uses custom addons that need to be available during migration.
- Local Directory:
--extra-addons /path/to/custom_addons - Local ZIP File:
--extra-addons /path/to/addons.zip - Remote ZIP URL:
--extra-addons https://example.com/custom_modules.zip
custom_addons/
βββ requirements.txt # Optional: Python dependencies for your addons
βββ module_1/
β βββ __init__.py
β βββ __manifest__.py
βββ module_2/
β βββ __init__.py
β βββ __manifest__.py
Note: If your custom addons require additional Python packages, include a requirements.txt file in the root directory. Dependencies will be automatically installed during the upgrade process.
This tool supports upgrading Odoo databases from version 10.0 through 19.0. The upgrade paths and compatibility are determined by the OCA OpenUpgrade project, which maintains migration scripts for each Odoo version.
Contributions are welcome!
- Database credentials are hardcoded for the temporary Docker container
- The PostgreSQL container is on an isolated Docker network
- No ports are exposed to the host machine
- Containers are automatically cleaned up after upgrade
- Consider using this tool in isolated environments for production databases
This project is licensed under the MIT License - see the LICENSE file for details.
- OCA (Odoo Community Association) for the OpenUpgrade framework
- OpenUpgrade Project for migration scripts
- Issues: GitHub Issues
- Email: fasilwdr@hotmail.com
- β Added support for Odoo 19.0
- β¨ Added custom addons support via
--extra-addonsoption - π¦ Support for local directories, local ZIP files, and remote ZIP URLs
- π Automatic addon mounting during upgrade process
- π― Enhanced upgrade workflow with custom module integration
- β¨ Initial release with core upgrade functionality
- β Support for Odoo versions 10.0 through 18.0
- π³ Docker-based isolated upgrade environment
- π Rich CLI output with progress indicators
- π URL download support for remote databases
- π¦ Automatic packaging of upgraded databases
Made with β€οΈ by Fasil | Powered by OpenUpgrade
β If you find this tool helpful, please star the repository!