A powerful command-line tool for managing Odoo modules across multiple server instances.
- Install, uninstall, and update Odoo modules
- Export installed modules to YAML configuration files
- Process multiple Odoo servers in a single operation
- Secure password management with keyring support
- Dependencies analysis to prevent breaking installations
- Parallel processing for faster operations
- Detailed status reporting
- Colorful and informative console output
- Comprehensive logging system
- Python (>= 3.8)
- OdooRPC (>= 0.10.1)
- PyYaml (>= 6.0.2)
- python-dotenv (>= 1.0.0)
- click (>= 8.1.8)
- colorama (>= 0.4.4)
- tqdm (>= 4.62.0)
- keyring (>= 23.0.0)
- python-dateutil (>= 2.8.2)
Use pip to install the package:
pip install odoo-module-un-install-equitaniaThe tool provides three main commands:
run- Execute module operations (install, uninstall, update)status- Display module status informationexport- Export installed modules to YAML file
# Run operations
odoo-un-install run [OPTIONS]
# Show version
odoo-un-install --version
# Show module status
odoo-un-install status [OPTIONS]
# Export installed modules
odoo-un-install export [OPTIONS]$ odoo-un-install run --help
Options:
--server_path DIRECTORY Path to folder containing .env server configuration files
--module_path DIRECTORY Path to folder containing module configuration files
--uninstall_modules Uninstall modules defined in "Uninstall" section
--install_modules Install modules defined in "Install" section
--update_modules Update modules defined in "Install" section
--check_dependencies Check module dependencies before operations (recommended)
--parallel Process modules in parallel for faster execution
--max_workers INTEGER Maximum number of parallel workers [default: 5]
--show_status Show detailed module status report after operations
-v, --verbose Enable verbose output for debugging
--help Show this message and exit$ odoo-un-install status --help
Options:
--server_path DIRECTORY Path to folder containing .env server configuration files
-v, --verbose Enable verbose output for debugging
--help Show this message and exit$ odoo-un-install export --help
Options:
--server_path DIRECTORY Path to folder containing .env server configuration files
--output FILE Output YAML file path
--include-base Include base Odoo modules (default: exclude)
--states TEXT Module states to export (comma-separated)
Options: installed,to upgrade,to install,to remove
-v, --verbose Enable verbose output for debugging
--help Show this message and exit# Basic usage with .env configuration
odoo-un-install run --server_path=./env_configs --module_path=./modules_yaml --install_modules --uninstall_modules
# Using custom configuration paths
odoo-un-install run --server_path=$HOME/configs/servers --module_path=$HOME/configs/modules --install_modules --update_modulesTo update existing modules, use the --update_modules flag:
odoo-un-install run --server_path=./servers --module_path=./modules --update_modulesThe tool will use the modules listed in the Install section of your YAML files:
Install:
- module_to_update_1
- module_to_update_2When running with the --update_modules flag:
- The tool connects to each configured Odoo server
- For each module in the
Installsection:- If the module is already installed, it will be updated to the latest version
- If the module is not installed, it will be skipped (unless
--install_modulesis also specified)
You can combine update with installation and dependency checking:
odoo-un-install run --server_path=./servers --module_path=./modules --update_modules --install_modules --check_dependenciesThis will:
- Install modules that are not yet installed
- Update modules that are already installed
- Check dependencies before performing operations
Create .env files in your server configuration folder:
# Required fields
ODOO_URL=https://your-odoo-server.com
ODOO_USER=admin
# Optional fields
ODOO_PORT=443
ODOO_PASSWORD=your-password
ODOO_DATABASE=your-database
ODOO_USE_KEYRING=trueBenefits of .env format:
- Industry-standard configuration format
- Better IDE support and syntax highlighting
- Easier integration with environment variables
- Compatible with Docker and CI/CD pipelines
File naming: production.env, staging.env, localhost.env, etc.
For complete .env examples and documentation, see the env_examples/ directory.
Create YAML files in your module configuration folder:
Install:
- module_name_1
- module_name_2
Uninstall:
- module_name_3
- module_name_4Basic usage:
# Install modules
odoo-un-install run --server_path=./env_configs --module_path=./modules_yaml --install_modules
# Uninstall modules
odoo-un-install run --server_path=./env_configs --module_path=./modules_yaml --uninstall_modules
# Update modules
odoo-un-install run --server_path=./env_configs --module_path=./modules_yaml --update_modules
# Install and update modules with dependency checking
odoo-un-install run --server_path=./env_configs --module_path=./modules_yaml --install_modules --update_modules --check_dependencies
# Check module status
odoo-un-install status --server_path=./env_configs
# Export installed modules to YAML
odoo-un-install export --server_path=./env_configs --output=my_modules.yamlExport examples:
# Export only installed modules (excluding base Odoo modules)
odoo-un-install export --server_path=./env_configs --output=installed_modules.yaml
# Export all modules including base Odoo modules
odoo-un-install export --server_path=./env_configs --output=all_modules.yaml --include-base
# Export modules that need upgrade
odoo-un-install export --server_path=./env_configs --output=upgrade_modules.yaml --states="to upgrade"
# Export multiple states (installed + to upgrade)
odoo-un-install export --server_path=./env_configs --output=multi_state.yaml --states="installed,to upgrade"Export Output Format:
The export command generates a structured YAML file with modules organized by category:
# Server: https://example.odoo.com
# Database: production_db
# Odoo Version: 18
# Export Date: 2025-06-24 10:30:45
# Total Modules: 45
Install:
# Accounting (12 modules)
- account
- account_invoicing
- account_payment
- account_reports
# CRM (5 modules)
- crm
- crm_livechat
- crm_phone_validation
# Human Resources (8 modules)
- hr
- hr_attendance
- hr_holidays
- hr_recruitment
# Sales (10 modules)
- sale
- sale_management
- sale_crm
- sale_stock
# Website (10 modules)
- website
- website_blog
- website_crm
- website_sale
Uninstall: []Features:
- Modules grouped and sorted by English category names
- German category names automatically translated to English
- Module count displayed for each category
- Server and database information in header comments
- Base Odoo modules excluded by default (use
--include-baseto include)
Advanced examples:
# Complete operation with all options
odoo-un-install run --server_path=./env_configs --module_path=./modules_yaml --uninstall_modules --install_modules --update_modules --check_dependencies --parallel --max_workers=10 --show_status --verbose
# Multiple servers with update
odoo-un-install run --server_path=$HOME/configs/odoo_servers --module_path=$HOME/configs/odoo_modules --uninstall_modules --install_modules --update_modules
# Parallel processing across multiple servers
odoo-un-install run --server_path=$HOME/configs/odoo_servers --module_path=$HOME/configs/odoo_modules --uninstall_modules --install_modules --update_modules --parallelThe tool uses passwords in the following priority order:
- Environment variable
ODOO_PASSWORD(if set in .env file or shell environment) - System keyring (if
use_keyring: trueorODOO_USE_KEYRING=true) - Interactive prompt (fallback if no password found)
For Production Servers:
ODOO_URL=https://production.example.com
ODOO_USER=admin
ODOO_PASSWORD= # Leave empty
ODOO_USE_KEYRING=true # Use system keyring for secure storageFor Development:
ODOO_URL=http://localhost
ODOO_PORT=8069
ODOO_USER=admin
ODOO_PASSWORD=admin # OK for local development
ODOO_USE_KEYRING=falseFor CI/CD Pipelines:
ODOO_URL=https://staging.example.com
ODOO_USER=ci_user
ODOO_PASSWORD=${CI_ODOO_PASSWORD} # From CI secrets
ODOO_USE_KEYRING=false*.env to your .gitignore (excluding templates like template.env.example)
# 1. Clone or navigate to the project directory
cd /path/to/odoo-module-un-install
# 2. Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate # On macOS/Linux
# or on Windows: .venv\Scripts\activate
# 3. Install dependencies with UV (recommended)
pip install uv
uv pip install -r requirements.txt
# 4. Install package in editable mode
uv pip install -e .
# 5. Verify installation
odoo-un-install --version
odoo-un-install --help# Create test directories
mkdir -p test_config/servers
mkdir -p test_config/modules
# Create test .env server configuration
cat > test_config/servers/localhost.env << 'EOF'
ODOO_URL=http://localhost
ODOO_PORT=8069
ODOO_USER=admin
ODOO_PASSWORD=admin
ODOO_DATABASE=test_db
ODOO_USE_KEYRING=false
EOF
# Create test module YAML configuration
cat > test_config/modules/test_modules.yaml << 'EOF'
Install:
- base
- sale_management
Uninstall:
- website_blog
EOF# Test connection to server
odoo-un-install status --server_path=test_config/servers
# Test module installation with verbose output
odoo-un-install run \
--server_path=test_config/servers \
--module_path=test_config/modules \
--install_modules \
--verbose
# Test with example configurations
odoo-un-install run \
--server_path=./env_examples \
--module_path=./yaml_examples/modules_yaml \
--install_modules \
--verbose
# Run unit tests
pytest tests/ -v
# Run tests with coverage
pytest --cov=odoo_module_un_install tests/- ✅ Package installs without errors
- ✅ CLI commands work (
--version,--help) - ✅ .env files are parsed correctly
- ✅ Connection to Odoo server succeeds
- ✅ Module operations (install/uninstall/update) work
- ✅ All unit tests pass (21/21)
- ✅ Verbose logging shows detailed information
See CHANGELOG.md for a detailed history of changes.
For release notes of the current version, see RELEASE_NOTES.md.
This project is licensed under the terms of the AGPLv3 license.
For questions and support, please open an issue on the GitHub repository.
- Equitania Software GmbH - Website
This tool is built with: