Odoo Migration Debugging

Odoo Migration XML Debugging

amirreza-km Updated

File contents

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

  1. Check XML IDs using select * from ir_model_data where name = '...';
  2. Compare old and new records in the source and destination versions.
  3. Fix references by manually updating noupdate flags or deleting orphaned ir_model_data.
  4. 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.

amirreza-km/skill-memory-mcp/tree/main/skill-memory-mcp/skills/examples/odoo-migration-debugging commit a45d04f75a

Frequently asked questions

npx skillmds@latest add amirreza-km/odoo-migration-debugging