Creating models
Models are at the heart of the Odoo framework. They describe the application data structures and are the bridge between the application server and the database storage. Business logic can be implemented around models to provide application features, and user interfaces are created on top of them to provide the user experience.
In the following subsections, we will learn about the model's generic attributes, which are used to influence their behavior, and the several types we have available – regular models, transient models, and abstract models.
Model attributes
Model classes can use additional attributes to control some behaviors. These are the most commonly used attributes:
_name
: This is the internal identifier for the Odoo model we are creating. This is mandatory when creating a new model._description
: This is a user-friendly title that can be used to refer to a singleModel
record, such asBook
. This is optional but recommended...