Development Book V17: Transient Model

The abstract model is the base class for all Odoo models that are meant to be stored in the database. Every Odoo model is created by inheriting from this class. It provides a foundational structure and common functionality for database-persisted entities in Odoo development, ensuring a streamlined and consistent approach when creating and managing models.

from odoo import models, fields


class AbstractModel(models.AbstractModel):
    _name = "model.name"

    field = fields.Char(string="Field label")

Transient model

The transient model serves as the superclass for records in Odoo that are designed to be temporarily persistent and regularly cleaned. This model simplifies access rights management by adopting a temporary paradigm. Users can create new records, but they can only access the records they've created. Transient model records are accessible to the superuser without any restrictions.

from odoo import models, fields


class TransientModel(models.Transientmodel):
	_name = "model.name"

	field = fields.Char(string="Field label")
whatsapp
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message