December 2018
Beginner to intermediate
404 pages
10h 14m
English
New Models are defined through Python classes. Extending Models is also done through Python classes, with help from an Odoo-specific inheritance mechanism, that is, the _inherit class attribute. This _inherit class attribute identifies the Model to be extended. The new class inherits all of the features of the parent Odoo Model, and we only need to declare the modifications to introduce.
The coding style guidelines recommend having a Python file for each Model, so we will add a library_member/models/library_book.py file, extending the original Model. Let's start by adding the __init__.py code files needed for that file to be actually included in the module:
Read now
Unlock full access