Odoo Migration XML Debugging
Description
A procedure for debugging failed Odoo OpenUpgrade migrations related to XML ID references.
When to use
When OpenUpgrade migration fails because of XML references or missing external IDs.
Requirements
- Access to the OpenUpgrade source code.
- PSQL access to the database.
Procedure
- Check XML IDs using
select * from ir_model_data where name = '...'; - Compare old and new records in the source and destination versions.
- Fix references by manually updating
noupdateflags or deleting orphanedir_model_data. - Test migration locally.
Examples
If an old view was removed:
DELETE FROM ir_model_data WHERE model = 'ir.ui.view' AND name = 'view_old_feature';
Common mistakes / Pitfalls
Avoid deleting XML IDs blindly. Always backup the database first.