Overview
Odoo 19 refines patterns introduced in v17 and v18 while introducing its own breaking changes. The focus is on stricter validation, improved performance defaults, and cleaning up technical debt. This reference covers changes that affect custom module migration from v18 to v19.
ORM and Model Changes
Inheritance Patterns
Odoo 19 tightened inheritance validation:
- Classic inheritance (
_inheritwithout_name) now validates that the parent model exists at module install time, not just at runtime - Delegation inheritance (
_inherits) validates that the delegated field exists and is a Many2one - Prototype inheritance (
_inheritwith_name) validates that no field name collisions exist with the parent - Mixin classes now enforce that
_abstract = Trueis set explicitly
Field Definitions
precompute=Trueis now the default for stored computed fields that depend only on stored fields — previously this was opt-incompute_sudodefault behavior was standardized — computed fields usingsudo()in compute methods must declarecompute_sudo=True- Related fields with
store=Truehave improved cache invalidation, which may surface previously hidden bugs - Currency fields using
currency_fieldparameter now validate that the referenced field exists
ORM Methods
create()multi-create (@api.model_create_multi) is now mandatory — single-recordcreate()raises a deprecation warningunlink()triggers cascade validation more strictly — orphaned records in related tables are detectedsearch()with invalid domain operators raisesValueErrorinstead of silently ignoringmapped()performance was improved but behavior for nested dotted paths was standardized
View and XML Changes
- All views must declare
modelin the view record — omitting it raises an error during module installation - XPath expressions are validated more strictly — malformed xpath raises clear errors instead of silent failures
- The
groupsattribute on fields in views now validates against existing group XML IDs at install time - Form view
sheetelement is now required for all form views (previously optional for simple forms) - Statusbar widget validates that the field is a Selection type
Frontend Changes
OWL Components
- All components must use the
setup()pattern — constructor-based initialization raises errors - The
useEffecthook was refined for better cleanup handling - Component props validation is now enforced in production mode (previously dev-only)
- Lazy-loaded component patterns were standardized
Web Client
- The action manager API was updated — custom client actions need review
- Notification system uses new severity levels
- Dialog component API changed — custom dialogs need updates
- Breadcrumb generation logic changed for multi-level navigation
Security Changes
- API key authentication was hardened — tokens now have configurable expiry
- CORS policy enforcement is stricter by default
- CSRF token validation was expanded to cover more endpoints
- Session fixation protections were enhanced
Configuration Changes
db_maxconndefault changed from 64 to 32 per worker for better resource managementlimit_time_realdefault was increased for long-running operations- New
websocket_keep_alive_timeoutparameter added - Log format includes request ID for better traceability
Removed Features
- QWeb report engine fallback to Jinja2 was removed completely
- Legacy form view
oe_button_boxwithoutnameattribute support dropped - Old-style action definitions without
typefield removed treetag in XML — list views must use<list>tag (tree tag removed entirely)
Migration Steps
- Update
__manifest__.pyto version19.0.x.x.x - Replace
<tree>tags with<list>in all view definitions - Add
@api.model_create_multito allcreate()overrides - Verify all inheritance declarations are valid
- Add
sheetelement to form views missing it - Update OWL components to use
setup()pattern exclusively - Test all views for stricter validation errors
- Review record rules and security for tightened enforcement
DeployMonkey
DeployMonkey fully supports Odoo 19. Deploy v19 instances and use the AI agent to identify breaking changes in your custom modules before migration.