Defining the model representation and order

Models have structural attributes for defining their behavior. These are prefixed with an underscore. The most important model is _name, as this defines the internal global identifier. Odoo creates the database table with this _name attribute. For example, if you provide _name="library.book", then the Odoo ORM will create the library_book table in the database. This is why the _name attribute must be unique across Odoo.

There are two other attributes that we can use on a model: one to set the field that's used as a representation or title for the records, and another to set the order in which the records are presented.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset