Hi,
For migrating module from one version to another, you have to know the technical/functional difference between the versions.
Module Migration: https://www.youtube.com/watch?v=IH9bQKrVLrU
The technical changes that has to be considered while migrating module to odoo15 are:
t-raw QWeb directives are replaced by t-out/t-esc ones, with the optional Python tool markupsafe.Markup for escaping HTML content in server side. HTML fields apply directly the markup when used on QWeb. See https://github.com/odoo/odoo/commit/01875541b1a8131cb, https://github.com/odoo/odoo/pull/70004 and https://github.com/odoo/odoo/pull/70004 for more details.
The access to ir.model* objects has been removed, so you need to use sudo, or use the existing methods for getting usual data. See https://github.com/odoo/odoo/pull/69120 for more info.
Jinja syntax in mail templates has been replaced by 2 languages:
Qweb for the body of the mail template.
inline_template, which is similar to Jinja, but with expressions enclosed by {{ and }} instead of ${ and }. It's used in fields like subject, email_from, email_to, etc.
More info and examples of replacing at https://github.com/odoo/odoo/pull/77074
If you migrate some .js file to an ES module (they start with /** @odoo-module **/), rename the file to finish with .esm.js (rename also the assets) to enable ESLint compatibility.
Assets are now directly declared in the manifest. You should move .js and .scss links from templates to __manifest__.py file. They should be placed under "assets" key with the following structure:
"assets": {
"web.assets_backend": ["path to .js or css, like /module_name/static/src/...",...],
"web.assets_qweb": ["path to .xml, like /module_name/static/src/...",...],
"...": [...],
},
Notice that there is no more "qweb" key in __manifest__.py. Instead of it, you must link all qweb .xml in web.assets_qweb bundle, as shown above.
The path to the files is now relative to the root folder, not the module folder.
Illustrative example: https://github.com/OCA/credit-control/pull/154/commits/c2349c52dc5385f46c94bfa8fc0db2381b251fc8
Source: https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-15.0
Thanks
Hello Matteo,
You mean you have to migrate odoo 14 custom modules in odoo 15?