Odoo 17 Model Attributes

Cybrosys Technologies

04-03-2024

1. _name

It corresponds to the model's name. The model name is expressed in dot-notation within the module namespace.

Odoo 17 Model Attributes

2. _auto (default = true)

By default, it is True for models and Transient models and False for abstract models.

Odoo 17 Model Attributes

3. _log_access (default = auto)

It determines whether the ORM should automatically generate and update Access Log files.

Odoo 17 Model Attributes

4. _abstract

This attribute determines whether the model is abstract or not.

Odoo 17 Model Attributes

5. _transient

This attribute determines whether the model is transient or not.

Odoo 17 Model Attributes

6. _check_company_auto (default = false)

During write and create operations, invoke the _check_company function to guarantee consistency among companies for relational fields with the check_company=True attribute.

Odoo 17 Model Attributes

7. _inherit = ()

When working with a model that already exists in the database, we employ this attribute for both classical and extension types of inheritance.

Odoo 17 Model Attributes

8. _order(default = ‘id’)

The default field for ordering search results.

Odoo 17 Model Attributes