Odoo 19 Odoo 20 Migration Notes & Fixes
1. KeyError: 'ir.model.access' If your module fails to load with a KeyError: 'ir.model.access' , check your security folder. Odoo 20 has changed how access rights are structured and named. What changed: The file security/ir.model.access.csv has been replaced by security/ir.access.csv , and the columns have been streamlined. Old format:…
Key errors and migration notes for Odoo 19 to 20:
1. KeyError: ir.model.access - If module fails to load, check security folder. Odoo 20 replaced security/ir.model.access.csv with security/ir.access.csv, streamlining columns. Update old format to new permission mapping format.
2. KeyError: ir.rule - Check record rules alongside access rights if security configuration breaks during registry loading. Update old record rule XML to new access domain format.
3. employee_type renamed to employee_type_id - It's now a Many2one relation, not a Selection field. Update code and logic accordingly.
4. _sql_constraints deprecated - Replace with models.Constraint for explicit SQL constraints. Use grep to find outdated constraints.
5. report_file issue in QWeb reports - Remove report_file field from report actions. Use report_name instead. Test PDF outputs thoroughly.
6. Double-check technical model names - Single-character typos can block module installation. Verify technical names using grep command.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.