Adding features to a model using inheritance
Odoo boasts a robust feature that significantly enhances its flexibility and functionality, which is particularly beneficial for businesses seeking tailored solutions. This feature enables the integration of module add-ons, allowing them to augment the capabilities of existing modules without the need to alter their underlying codebase. This is achieved through the addition or modification of fields and methods, as well as the extension of current methods with supplementary logic. This modular approach not only facilitates a customizable and scalable system but also ensures that upgrades and maintenance remain streamlined, preventing the complexities typically associated with custom modifications.
The official documentation describes three kinds of inheritance in Odoo:
- Class inheritance (extension)
- Prototype inheritance
- Delegation inheritance
We will see each one of these in a separate recipe. In this recipe, we...