If you maintain custom Odoo modules, the Owl change is probably the biggest thing in the 19 to 20 jump. I compared the two releases instead of trusting blog posts, so here is what I found.
Disclosure: I make a paid Odoo module that checks for this (link at the bottom). The findings below stand without it.
Owl itself. Odoo 19 ships Owl 2.8.4. Odoo 20 ships Owl 3.0.0-alpha.50. These names are no longer exported by Owl: loadFile, onRendered, onWillRender, reactive, status, useChildSubEnv, useComponent, useEnv, useExternalListener, useRef, useState, useSubEnv, validate.
The compatibility layer. Odoo 20 includes web/static/src/owl2/owl3_compatibility_layer.js, which describes itself as temporary. It puts back Component, App, mount, status, onWillRender, useComponent, useEnv and useSubEnv, but not useState, useRef, reactive, useExternalListener, onRendered, useChildSubEnv, validate or loadFile. It also asks you to rename t-portal to t-custom-portal, t-model to t-custom-model, and useEffect to useLayoutEffect.
To see how much Odoo itself moved: useState is imported in 486 JavaScript files of Odoo 19 and in 2 of Odoo 20. useRef goes from 270 files to none.
Python is changing too. In the 20.0 image I checked, odoo.osv.expression, odoo.service.db and odoo.tools.pycompat no longer exist, ir.rule and ir.model.access were replaced by ir.access, and _check_recursion is no longer a method of every model.
Checking all of that by hand across several modules is slow, so I wrote a scanner that reads a module's Python, XML and JavaScript and lists each line that breaks, with the reason. It's called Odoo 20 Code Scanner, 39 EUR on the Apps Store: https://apps.odoo.com/apps/modules/19.0/odoo20_code_scanner/
The comparison covers Community modules only, and the scan is static: code that builds names at run time can't be followed.
Top comments (0)