A zero-dependency CLI tool to migrate Odoo Enterprise databases to Community Edition by stripping proprietary artifacts.
Project description
Odoo Liberate
A zero-dependency CLI tool to migrate Odoo Enterprise databases to Community Edition.
Why this exists
When you restore an Odoo Enterprise backup on an Odoo Community instance, the database retains proprietary artifacts (like Enterprise-exclusive views, menus, modules, and grid/gantt view modes). Because the Community Edition doesn't have the source code to render these, the Odoo web client crashes with OwlError and KanbanArchParser tracebacks when you navigate the UI.
odoo-liberate automates the process of extracting the backup, restoring the database, copying the filestore, and most importantly, scrubbing these Enterprise artifacts directly from the database using SQL queries, so your instance can boot properly on Community Edition.
Requirements
- Python 3.7+
psqlavailable in your system's PATH
Installation
You can run odoo-liberate directly using uv:
uv tool install .
Or run it without installing using:
uv run odoo-liberate
Usage
Full Migration (Extract, Restore, Scrub)
Run the tool against your .zip backup file generated from the Odoo database manager:
odoo-liberate backup.zip -d my_database -U my_db_user -W my_password --filestore-dest /var/lib/odoo/filestore/my_database
This will:
- Extract
backup.zipto a temporary directory. - Restore
dump.sqlinto themy_databasePostgreSQL database. - Copy the
filestore/directory to/var/lib/odoo/filestore/my_database. - Run the scrubbing queries against
my_database.
To automatically reset all passwords to admin and disable 2FA during this process, append the --reset-security flag:
odoo-liberate backup.zip -d my_database -U my_db_user --reset-security
Scrub Only (For an already restored database)
If you've already manually restored your database and just need to scrub the Enterprise artifacts to fix the UI crashes:
odoo-liberate -d my_database -U my_db_user -W my_password --scrub-only
Security Reset Only (Fixing Administrator Lockouts)
If you have already restored and scrubbed your database, but find yourself locked out because you don't know the cloud password or have 2FA enabled, you can run:
odoo-liberate -d my_database -U my_db_user -W my_password --security-only
This will forcefully disable 2FA and reset all user passwords to admin without altering any other data.
Important Next Step
After odoo-liberate finishes a scrub, you MUST run the following command to have Odoo's ORM finalize the removal of the deactivated Enterprise modules:
odoo -u all -d my_database
Once this is complete, restart your Odoo server and you're good to go!
Troubleshooting & Common Pitfalls
When restoring cloud backups locally, you might run into a few common gotchas that this tool cannot automatically fix for you. Here is how to resolve them:
1. "Too many login failures" (Rate Limiting)
If you try to log into the restored database with the wrong password too many times, Odoo will lock you out. Since it's a restored database, your local .env default passwords (like admin) might not work.
Fix: Simply restart your Odoo web container/server. The rate-limit cache is cleared on restart, allowing you to try again.
2. Administrator Lockouts (Passwords & 2FA)
When restoring a cloud backup, you usually inherit the cloud's secure passwords and Two-Factor Authentication configurations, which would lock you out locally.
Fix: You can bypass this using odoo-liberate --security-only as described above, or by appending --reset-security to your initial migration command.
3. psql Restoration Errors (relation does not exist)
When odoo-liberate restores the dump.sql, you might see some ERROR: messages in the console (e.g., relation "public.ai_embedding" does not exist or role "odoo" does not exist).
Fix: This is entirely normal! Odoo Cloud environments often use proprietary PostgreSQL extensions (like pgvector) or specific roles that your local standard Postgres image lacks. odoo-liberate intentionally runs the restore command in a way that ignores these missing relations and continues restoring all the standard tables. You can safely ignore these errors.
Contributing
See CONTRIBUTING.md for a guide on how to add new modules, view modes, or custom SQL queries to make the database scrubbing process even more robust.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odoo_liberate-0.1.0.tar.gz.
File metadata
- Download URL: odoo_liberate-0.1.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
497673f041647ca9383b3894b62dc89a2f974a0025d1f43f8db8a1ec3f47414b
|
|
| MD5 |
07497cd9632d2937e92df334a9073ab7
|
|
| BLAKE2b-256 |
9439ee062388d89a9f000fc198a3afe05f460001643eb3ef39824b617d48aae6
|
Provenance
The following attestation bundles were made for odoo_liberate-0.1.0.tar.gz:
Publisher:
publish.yml on tiborrr/odoo-liberate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odoo_liberate-0.1.0.tar.gz -
Subject digest:
497673f041647ca9383b3894b62dc89a2f974a0025d1f43f8db8a1ec3f47414b - Sigstore transparency entry: 2343137668
- Sigstore integration time:
-
Permalink:
tiborrr/odoo-liberate@e4ff0c8e842feda5315008334e88a967febce7d7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tiborrr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e4ff0c8e842feda5315008334e88a967febce7d7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file odoo_liberate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: odoo_liberate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
144926694fed0c3cfb9505cb3273612f1d703af09b2a4b7c33b704b1d45be59e
|
|
| MD5 |
45026e621479d78a7f41a522cc474007
|
|
| BLAKE2b-256 |
f8d48aac5ffa083b8a6b93ae014b2a43deaac6619f06efefa3e938fe28dee8c0
|
Provenance
The following attestation bundles were made for odoo_liberate-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on tiborrr/odoo-liberate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odoo_liberate-0.1.0-py3-none-any.whl -
Subject digest:
144926694fed0c3cfb9505cb3273612f1d703af09b2a4b7c33b704b1d45be59e - Sigstore transparency entry: 2343137677
- Sigstore integration time:
-
Permalink:
tiborrr/odoo-liberate@e4ff0c8e842feda5315008334e88a967febce7d7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tiborrr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e4ff0c8e842feda5315008334e88a967febce7d7 -
Trigger Event:
push
-
Statement type: