A compact, intensive course for developers who already write Odoo modules, but want to stop doing “it works somehow” and start building extensions that are predictable, maintainable, and safe for upgrades.
What You’ll Gain
- Clear mental model of all types of inheritance in Odoo (models, views, QWeb, controllers, data).
- Practical patterns for overriding methods and views without breaking other modules.
- Understanding of loading order, dependencies, and update behavior of modules.
- A checklist of anti-patterns to avoid and migration-friendly approaches.
Course Modules
1. Odoo Modules & Inheritance Map
1 lesson
Build a clear picture of how modules connect to each other and what “inheritance” means in each layer.
- Module anatomy:
__manifest__,__init__, load order,depends, data files. -
Types of inheritance in Odoo (overview):
-
models—_inherit,_name,_inherits. views— XML inherit,xpath, priorities.QWeb—t-inherit,t-call.controllers— routes override/extension.- Where to extend vs where not to extend: choosing the right layer.
- How module loading & update impact your overrides (common traps).
- Homework: refactor a simple “spaghetti” module into clean addon with explicit dependencies and single responsibility.
2. Model Inheritance & Method Overrides
1 lesson
Learn to extend models and business logic correctly, without killing performance or breaking other addons.
-
_inheritvs_namevs_inherits: -
Extension vs new model vs delegation.
- When to use which and typical use cases.
-
Overriding methods safely:
-
super()patterns, respecting API (@api.model,@api.depends,@api.constrains,@api.onchange). - Don’t break contracts: domain, context, return values.
- Adding fields:
related,compute,store, inverse — how they affect performance and upgrading. - Inheritance and security: how overriding create/write/unlink interacts with access rules & record rules.
- Anti-patterns: hard-coded IDs, logic in
computethat shouldn’t be there, side-effects inonchange. - Homework: redesign a given override to be upgrade-safe, write a short review “what can break if X changes in core”.
3. Views, QWeb, Security & Data Inheritance
1 lesson
Master extending UI and data layer without “xml_id wars” and broken forms.
-
View inheritance:
-
inherit_id,xpathbest practices (stable anchors, minimal changes). positiontypes and when to use them.- Avoiding fragile overrides (what often breaks on upgrade).
-
QWeb inheritance:
-
t-inherit,t-jquery,t-call— how they combine. - Extending reports, portal, website blocks.
-
Security & data extension:
-
Inheriting / extending
ir.model.accessand record rules. - Data files:
noupdate, update behavior, extending core data via XML. - Typical conflicts between modules: view clash, QWeb override clash, security regression — and how to debug them.
- Homework: implement a safe view + QWeb extension for a given model, with explicit reasoning why it’s robust.
4. Advanced Patterns, Anti-Patterns & Refactoring
1 lesson
Put everything together: build extension strategies that survive years of updates and other developers.
- Designing extension points: hooks, mixins, “template methods” pattern.
- Composition vs inheritance: when to use mixins and helper services instead of endless
_inherit. -
Handling conflicts:
-
Multiple modules overriding the same method/view.
- Techniques to reduce coupling and make behavior predictable.
-
Migration-friendly code:
-
What usually breaks on major upgrades.
- How to structure overrides to minimise friction.
- Code review checklist for Odoo inheritance/overrides (you will get a ready-to-use checklist).
-
Final mini-project:
-
You get a spec and several existing modules.
- Design and describe your inheritance/override strategy + risks.
Contacts
Email: aghanimoff@gmail.com
Telegram: @aghanimoff
LinkedIn: Valerii Sharlai