Skip to main content
iVentureTeam

Odoo Custom Module Upgrade Guide (2026): How to Port Modules to a New Version

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
September 15, 20268 min read3 views
Summarize with AI
ChatGPT logoClaude logoDeepSeek logoPerplexity logo
Odoo custom module upgrade guide 2026

If a version upgrade stalls, custom modules are almost always why. The standard upgrade moves your database; your modules are on you. This Odoo custom module upgrade guide, grounded in Odoo's own developer docs, shows how to port them, whether you do it in-house or with Odoo upgrade services.

What is an Odoo custom module upgrade?

An Odoo custom module upgrade means refactoring a module you built (or had built) so it installs and runs on a newer Odoo version, as part of a wider version upgrade. It is a distinct piece of the larger job.

A custom module, in Odoo's own definition, is any module that extends standard Odoo and was not built with Studio. It is different from the overall version upgrade, which moves the whole system, and from database migration, which transforms your data and schema.

This Odoo custom module upgrade guide covers the module layer specifically: the code, views, and scripts that make your customizations work on the new release.

Why custom modules break between versions

Custom modules break because every Odoo version changes the APIs, view syntax, and framework your code depends on. Standard modules are updated by Odoo; your code is not.

Odoo's guidance on upgrading a customized database lists the usual failures: invalid module dependencies, changed assets and view syntax, references to fields, models, or views that were renamed or removed, xpath expressions that moved, and methods that were renamed or deleted.

Concrete examples help. Deprecated Python methods get removed between versions, the attrs and states view attributes were replaced in Odoo 17, and older JavaScript widgets must be ported to OWL. Always confirm the exact changes for your source and target versions in Odoo's release notes.

The custom module upgrade process, step by step

Odoo custom module upgrade process

Odoo defines a six-step process for upgrading a customized database, and the safe path runs the module work on test copies before production. Follow it in order.

1. Freeze development and challenge each customization against the new version, since features that are now standard can be dropped. 

2. Request an upgraded test database so the standard upgrade is confirmed to work on its own.

3. Make each custom module installable on an empty database of the new version, fixing every traceback and warning, then test, clean, and run the standard tests. 

4. Make the modules work on the upgraded database, migrating any renamed data with scripts and retesting.

5. Test again and do a full rehearsal the day before go-live, requesting a fresh test database so you are on current upgrade scripts. 

6. Upgrade production in a planned window. The module work sits inside the broader upgrade process, not instead of it.

Migration scripts for custom modules

Migration scripts move data safely when your module's structure changes, using a Python migrate() function that the upgrade runs while the module updates. They are what stops renamed fields from losing data.

Native Odoo scripts live at module/migrations/version/pre-*.py, post-*.py, or end-*.py, where the version is the full module version such as 17.0.2.0.

The pre-phase runs before the module loads, post after it loads, and end after all modules for that version, per Odoo's upgrade scripts reference. The Upgrade utils library gives helpers for the common cases.

# my_module/migrations/17.0.2.0/post-migrate.py
from odoo.upgrade import util

def migrate(cr, version):
    # Rename a field so its data survives the module upgrade
    util.rename_field(cr, "res.partner", "x_old_code", "x_new_code")
    # Recompute a stored field whose logic changed
    util.recompute_fields(cr, "sale.order", ["x_margin_total"])

For Community edition, the OCA project OpenUpgrade is the equivalent, with its own script style using the openupgradelib library. Rename models, fields, and external IDs with scripts (rename_field, rename_model, rename_xmlid) rather than by hand, so nothing is dropped.

Your custom module upgrade checklist

Run through this checklist for each custom module before go-live to avoid the most common failures. Each item removes a specific risk.

  • Bump the module version in the manifest to the new Odoo version.

  • Install the module on an empty new-version database with no tracebacks.

  • Fix deprecated Python methods and renamed field, model, and view references.

  • Update view syntax (attrs and states) and port front-end code to OWL.

  • Write upgrade scripts to rename any changed fields, models, or external IDs.

  • Recompute stored fields whose logic changed.

  • Re-enable or remove any views disabled during the upgrade.

  • Test the module on an upgraded copy of real data, then rehearse before production.

Book a free custom module upgrade review

Common custom module upgrade errors and how to fix them

Most custom-module upgrade failures come from a short list of causes. Plan for these.

Error

Cause

Fix

Traceback on install

Renamed or removed field, model, or method

Update references to the new version's names

View disabled after upgrade

View content no longer valid

Re-enable or fix it with an upgrade script

Data lost on a renamed field

No migration script for the rename

Rename with an upgrade script, not by hand

Custom records not updated

The noupdate flag blocks standard updates

Update them with an upgrade script

Scripts will not run on Odoo Online

Odoo Online does not allow custom Python

Move to Odoo.sh or self-hosted for the upgrade

Do it yourself, or bring in an Odoo partner?

You can upgrade simple custom modules in-house, but heavily customized or business-critical modules are where an Odoo partner pays for itself. The deciding factor is how much custom code you run and how much it touches financial data.

A small module with a few fields is a manageable in-house job for an Odoo developer. A large set of interdependent custom Odoo modules, or code that drives accounting and inventory, is where a missed script or API change can corrupt data that is hard to recover.

Because custom modules are the biggest driver of upgrade time and cost, getting this layer right is usually what decides whether the whole upgrade lands on budget.

How iVentureTeam upgrades your custom modules

We refactor each custom module for the new version, write the migration scripts, and validate everything on a copy before production. Your customizations are updated, not left to break.

Our Odoo development services makes your modules installable on the target version, ports views and OWL front-end code, writes the upgrade scripts that protect your data, and runs both standard and custom tests. You review the result on an upgraded copy of real data before go-live.

The outcome is custom functionality that keeps working on a supported, current Odoo version, with minimal downtime and a rollback ready.

Custom module upgrade in practice: modules moved to the latest version, intact

Odoo custom module to latest version migration case study

When Codequarters needed its custom Odoo modules moved to the latest version, iVentureTeam ran a two-track upgrade that kept everything working. The custom code was the whole challenge.

We refactored the module code for the new framework APIs and upgraded the database to the new schema in this Odoo custom module migration, so the system runs current and supported.

The outcome was one unified codebase on the latest Odoo version, 100% of custom module functionality preserved, and zero records lost in the schema upgrade.

The bottom line on upgrading Odoo custom modules

Upgrading custom modules is predictable work: make each module installable on the new version, protect data with migration scripts, and test on copies before production. The risk is in skipping the scripts and the staging tests, not in the port itself.

Know what breaks, script every rename, and test on an upgraded copy first. Do that, and your customizations move to a supported version cleanly rather than blocking the whole upgrade.

Ready to upgrade your Odoo custom modules?

Get your custom modules ported and tested for the new version, with your data proven intact. Book a free custom module upgrade review, call +91-93270-18076, or email business@iventureteam.com.

Frequently Asked Questions about Odoo Custom Module Upgrade

What is an Odoo custom module upgrade?

+

It is the work of refactoring a module you built so it installs and runs on a newer Odoo version. Odoo's standard upgrade transforms core data, but custom modules must be adapted to the new version's APIs, view syntax, and framework separately.

Why don't my custom modules upgrade automatically?

+

Because Odoo only maintains its standard modules across versions. Custom code depends on methods, fields, and view syntax that change between releases, so it must be refactored and tested by you or your partner, not by the standard upgrade.

What is an Odoo upgrade script?

+

It is a Python file with a migrate(cr, version) function that Odoo runs while a module updates, stored under module/migrations/version/ as a pre, post, or end script. It transforms data, for example renaming a field so its values are not lost.

Can I upgrade custom modules on Odoo Online?

+

No. Odoo Online does not allow custom modules with Python code, so upgrade scripts cannot run there. To upgrade a customized database, use Odoo.sh or a self-hosted environment instead.

What is the difference between native upgrade scripts and OpenUpgrade?

+

Native Odoo scripts use a migrate(cr, version) function and the Upgrade utils library. OpenUpgrade is the OCA's open-source equivalent for Community edition, with its own openupgradelib helpers. Both transform data during a module upgrade.

Can I upgrade custom modules myself?

+

A small, standalone module is manageable for an in-house Odoo developer. A large or business-critical set of custom modules usually needs a partner, because a missed API change or migration script can corrupt data that is hard to recover.

Ready to put this into action?

Talk to iVentureTeam about Odoo, AI automation, or custom development — get a free, no-obligation consultation.