--- id: openupgradelib version: "3.13.6" license: AGPL-3 license_treatment: agpl maintenance: active --- # openupgradelib — A library with support functions to be called from Odoo migration scripts. License: agpl · Maintenance: active · Downloads: 279.0K/mo ## What it is and what it does OpenUpgradeLib is a support library for writing Odoo database migration scripts. It provides a collection of helper functions to safely perform common upgrade tasks: merging records while preserving foreign key integrity, renaming models and fields across the database, updating XML definitions, converting field types, and managing module reorganizations. The library handles both ORM and direct SQL approaches depending on the operation and dataset size. It depends on lxml, cssselect, and importlib_metadata for XML parsing and field introspection. The package is maintained by the Odoo Community Association and is actively used in production Odoo upgrades. It abstracts away low-level database manipulation and XML handling so migration script authors can focus on business logic rather than SQL correctness. Use it for: - Merge duplicate customer or product records during an Odoo version upgrade while maintaining referential integrity. - Rename a model across the entire database and update all XML IDs, properties, and foreign key references automatically. - Convert a binary field to an attachment-based storage during a major version migration. - Update module field locations when refactoring Odoo module structure across versions. - Transform XML view definitions from Bootstrap 3 to Bootstrap 4 during an upgrade. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides utility functions for Odoo database migrations, including record merging, field renaming, model updates, and XML transformations to support version upgrades. Yes, if you are writing Odoo migration scripts. The library is actively maintained, has no known vulnerabilities, and solves real problems in Odoo upgrades that would otherwise require manual SQL and XML manipulation. The AGPL-3 license is standard for Odoo ecosystem tools. Install only if you are performing Odoo version upgrades; it has no use outside that context. ## Install pip install openupgradelib uv add openupgradelib poetry add openupgradelib ## Installing openupgradelib Before you install: Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release (9 days old) and steady commit activity. Supports Python 2.7 and Python 3.5 through 3.9. License in practice: Licensed under AGPL-3, which requires that any modifications or derivative works must also be distributed under AGPL-3 and source code must be made available to users. This is a strong copyleft license suitable for internal tools but restrictive for proprietary software. Quickstart: pip install openupgradelib from openupgradelib import openupgrade # Example: merge records openupgrade.merge_records(env, 'model.name', [record_ids], target_id) Requires an active Odoo environment (env) to be passed; designed to run within Odoo migration scripts, not as a standalone tool. Verify before relying: - Whether the package works with Odoo versions released after 2026-08-05 or has version-specific constraints not listed in classifiers. - Performance characteristics when merging large datasets or handling complex many-to-many relationships. - Exact scope of XML transformation capabilities beyond Bootstrap 3-to-4 conversion mentioned in history. ## Package facts - License: AGPL-3 (agpl) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 279.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags odoo migration utilities, database record merging, odoo upgrade scripts, field renaming tools, odoo xml transformation, odoo-ecosystem, database-migration [View on SkillFed](https://skillfed.io/packages/openupgradelib) · [View on PyPI](https://pypi.org/project/openupgradelib/)