Creating models
Models are at the heart of the Odoo framework. They describe the application's data structure, and are the bridge between the application server and the database storage. Business logic can be implemented around models to provide the application's features, and user interfaces are created on top of them.
Next, we will learn about a model's generic attributes, used to influence their behavior, and the several model types we have available to use—regular, transient, and abstract.
Model attributes
Model classes can use additional attributes that control some of their behaviors. These are the most commonly used attributes:
_name
is the internal identifier for the Odoo model we are creating. This is mandatory when creating a new model._description
is a user-friendly title for the model's records, shown when the model is viewed in the user interface. This is optional but recommended._order
sets the default order to use when the model's records are browsed, or shown in a list...