Odoo upgrade guide
Odoo 16 to 17: what breaks in your custom modules
Odoo 17 rewrote how views express conditions and replaced the legacy JavaScript framework. A module that installs fine on 16 often fails to install on 17 because of attrs in a single view.
Odoo's upgrade service migrates your data and the standard modules. Custom modules, and third-party modules from the Apps Store, are yours to port. This page lists every change we know of between 16.0 and 17.0 that affects them. Each one was checked in the official Odoo sources of version 17.0.
How often it happens, in Odoo's own code
We ran these checks on the 547 standard modules of Odoo 16.0 Community, before Odoo ported them. It shows which changes cost the most. Your modules follow the same patterns.
| Change | Occurrences | Modules |
|---|---|---|
| "attrs" and "states" in views | 4,130 | 254 |
| odoo.define() modules | 559 | 117 |
| Legacy JavaScript widgets (web.*) | 358 | 90 |
| states= argument on fields | 207 | 37 |
| name_get() override no longer used | 105 | 49 |
| ORM methods removed in 17.0 | 2 | 2 |
| fields_view_get() override no longer called | 2 | 1 |
Every change, with the fix
Blocking the module fails to install or upgrade, or the code raises an error
- "attrs" and "states" in views. Write the condition directly in invisible="...", readonly="..." or required="..." as a Python expression.
- Legacy JavaScript widgets (web.*). Rewrite as an OWL component with ES module imports (@web/...).
- ORM methods removed in 17.0. fields_view_get → get_views/get_view, invalidate_cache → invalidate_model/invalidate_recordset, flush → flush_model/flush_recordset, get_xml_id → get_external_id.
- api.Environment.manage() removed. Remove the context manager: environments are managed automatically.
Silent no error, but the behaviour is lost
- states= argument on fields. Move the readonly/required condition to the view.
- name_get() override no longer used. Override _compute_display_name() instead.
- fields_view_get() override no longer called. Override get_views() or _get_view() instead.
To watch deprecated, still working, will break in a later version
- odoo.define() modules. Convert to an ES module with /** @odoo-module **/ and import statements.
Check your own modules
Upgrade Readiness is a free module on the Odoo Apps Store. Install it on your 16.0 database: it reads the source code of your custom modules and your Studio changes, and lists each of these issues with the file, the line and an effort estimate in hours. The analysis runs inside your database and nothing is sent anywhere.
Upgrade Readiness for Odoo 16.0 on the Apps Store
Odoo 16 is no longer one of the three versions covered by the Odoo Enterprise Subscription Agreement. Section 5.1 adds a yearly fee of 25% for databases on older versions.
Prefer not to do the port yourself? We port your custom modules and deliver a tested pull request.
Other versions
- Odoo 17 to 18: what breaks in your custom modules
- Odoo 18 to 19: what breaks in your custom modules
- Odoo 19 to 20: what breaks in your custom modules
Independent guide by Mahjoubi Jalel, not affiliated with or endorsed by Odoo S.A. Odoo is a trademark of Odoo S.A. A mistake or a missing change: support@assetguard.fr.