Legacy web.Widget Usage
A finding from the Migration Audit that flags legacy web.Widget patterns in module JavaScript that Odoo 15 and later replaced with OWL components.
What This Finding Means
The module extends web.Widget, web.AbstractField, or uses the Class.extend inheritance helper. These belong to the legacy widget framework that OWL components have replaced.
Why It Matters
The legacy widget layer is being removed across versions. Custom field widgets and client actions built on web.Widget can lose their base classes and stop loading, which breaks the interface they render.
Old Odoo Example
var Widget = require('web.Widget');
var MyWidget = Widget.extend({
start: function () {
return this._super.apply(this, arguments);
},
});Target Version Risk
- Odoo 15 and 16 — legacy widgets still available but deprecated
- Odoo 17 and later — legacy base classes increasingly removed, higher break risk
Recommended Fix Direction
Recreate the widget as an OWL component built on @odoo/owl. Replace lifecycle methods such as start with OWL hooks, move the markup into a QWeb template, and register field widgets through the field registry.
How to Verify Manually
Load the module in the target version and open every view or field the widget renders. Watch the browser console for missing-module errors and confirm interactions, rendering, and events behave as before.
Related Odoo Doctor Tool
The Migration Audit scans module JavaScript for legacy widget patterns and reports each file that still extends web.Widget.