Skip to main content

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+
  • psql available 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:

  1. Extract backup.zip to a temporary directory.
  2. Restore dump.sql into the my_database PostgreSQL database.
  3. Copy the filestore/ directory to /var/lib/odoo/filestore/my_database.
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odoo_liberate-0.1.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odoo_liberate-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

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

Hashes for odoo_liberate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 497673f041647ca9383b3894b62dc89a2f974a0025d1f43f8db8a1ec3f47414b
MD5 07497cd9632d2937e92df334a9073ab7
BLAKE2b-256 9439ee062388d89a9f000fc198a3afe05f460001643eb3ef39824b617d48aae6

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_liberate-0.1.0.tar.gz:

Publisher: publish.yml on tiborrr/odoo-liberate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for odoo_liberate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 144926694fed0c3cfb9505cb3273612f1d703af09b2a4b7c33b704b1d45be59e
MD5 45026e621479d78a7f41a522cc474007
BLAKE2b-256 f8d48aac5ffa083b8a6b93ae014b2a43deaac6619f06efefa3e938fe28dee8c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_liberate-0.1.0-py3-none-any.whl:

Publisher: publish.yml on tiborrr/odoo-liberate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page