upgrade-tools-imports (U2025)#
A name imported from odoo.tools that moved or was removed in Odoo 20.0.
Applies to Odoo 20.0 and later.
What it does#
Reports imports from odoo.tools of names that moved (Query to
odoo.orm.query, the index and SQL helpers to odoo.tools.sql, mod10r and
street_split to odoo.tools.business_data, convert_xml_import and
convert_csv_import to odoo.tools.convert) or were removed (pycompat,
populate, ustr, get_encodings), and imports from the removed modules
odoo.tools.query, odoo.tools.pycompat and odoo.tools.populate.
Why is this bad?#
The import fails on Odoo 20.0.
Fix safety#
Safe for moved names: they are imported from their new module.
odoo.tools.query becomes odoo.orm.query. Removed names need a person.