December 2018
Beginner to intermediate
404 pages
10h 14m
English
The method we used to extend the Model used only the _inherit attribute. We defined a class by inheriting the library.book Model and added some features to it. The class attribute _name was not explicitly set; implicitly, it was library.book.
However, if we set a different value on the _name attribute, it will create a new Model by copying features from the inherited ones.
In practice, this type of inheritance is usually used with abstract mixin classes. It is rarely, if ever, used to inherit from regular Models, since that would create duplicate data structures.
Odoo also has a delegation inheritance mechanism that avoids this data structure duplication, so it is usually preferred when inheriting ...
Read now
Unlock full access