Skip to main content

OdooUpgrader

GitHub Release Python Version Docker Downloads

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.

✨ Features

  • 🚀 Automated Incremental Upgrades: Automatically handles multi-step upgrades
  • 📦 Multiple Source Formats: Supports both .zip and .dump database 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

📋 Requirements

  • 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

🚀 Installation

Using pip (Recommended)

pip install odooupgrader

From Source

git clone https://github.com/fasilwdr/OdooUpgrader.git
cd OdooUpgrader
pip install -e .

📖 Usage

Basic Usage

Upgrade a local database file to version 16.0:

odooupgrader --source /path/to/database.zip --version 16.0

Download and Upgrade from URL

odooupgrader --source https://example.com/database.dump --version 17.0

Upgrade with Custom Addons

Include custom addons from a local directory:

odooupgrader --source /path/to/database.zip --version 16.0 --extra-addons /path/to/custom_addons

Include custom addons from a local ZIP file:

odooupgrader --source /path/to/database.zip --version 16.0 --extra-addons /path/to/addons.zip

Include custom addons from a remote ZIP URL:

odooupgrader --source /path/to/database.zip --version 16.0 --extra-addons https://example.com/custom_addons.zip

Specify PostgreSQL Version

odooupgrader --source /path/to/database.zip --version 16.0 --postgres-version 15

Enable Verbose Logging

odooupgrader --source /path/to/database.zip --version 18.0 --verbose

Save Logs to File

odooupgrader --source /path/to/database.zip --version 15.0 --log-file upgrade.log

Complete Example with All Options

odooupgrader \
  --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

🎯 Command-Line Options

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

📄 How It Works

  1. Validation: Checks if source file/URL is accessible and Docker is available
  2. Environment Setup: Creates necessary directories and PostgreSQL container
  3. Source Processing: Downloads (if URL) and extracts the database
  4. Addons Processing: Downloads and extracts custom addons (if provided)
  5. Database Restoration: Restores database and filestore to PostgreSQL
  6. Version Detection: Determines current database version
  7. Incremental Upgrades: Runs OpenUpgrade for each version step with custom addons
  8. Package Creation: Creates final .zip with upgraded database and filestore

📁 Output Structure

After successful upgrade, you'll find in the output directory:

output/
├── upgraded.zip          # Final packaged database (ready to restore)
└── odoo.log             # Upgrade process logs

🏗 Architecture

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]

🔧 Custom Addons

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.

Supported Formats

  • 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

Directory Structure

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.

📚 Supported Versions

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.

🤝 Contributing

Contributions are welcome!

🔒 Security Considerations

  • 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

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support

📈 Changelog

Version 0.3.0

  • ✅ Added support for Odoo 19.0

Version 0.2.0

  • ✨ Added custom addons support via --extra-addons option
  • 📦 Support for local directories, local ZIP files, and remote ZIP URLs
  • 🔌 Automatic addon mounting during upgrade process
  • 🎯 Enhanced upgrade workflow with custom module integration

Version 0.1.0 (Initial Release)

  • ✨ 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!

Metadata

Release files for odooupgrader 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for odooupgrader 0.3.0
File Size Uploaded Provenance
odooupgrader-0.3.0.tar.gz 16.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for odooupgrader 0.3.0
File Interpreter ABI Platform
odooupgrader-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.9 kB

Release files / odooupgrader-0.3.0.tar.gz

Download URL odooupgrader-0.3.0.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
29751e88a90e9b05972fd7c0facd6f4ce6679ee9656168a2772af0d45accba57
BLAKE2b-256 checksum
How to use checksums
adb0c7f0fed56c43023baddc8b4bb21f5baf94dc82fce12fe6f2f58153ae45b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 26, 2026.

Transparency log

Release files / odooupgrader-0.3.0-py3-none-any.whl

Download URL odooupgrader-0.3.0-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e82c1c7a0b18226220622605bb51531fab964213b807a427d068af52d37d5977
BLAKE2b-256 checksum
How to use checksums
c966fbbf2850f631c6ce4002cb66fffea86e4bfc4caaeb0d8b5ca74eb6753ec9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 26, 2026.

Transparency log

Security for odooupgrader 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for odooupgrader-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page