A Complete Guide to Transient Models (Wizards) in Odoo 19
A Complete Guide to Transient Models (Wizards) in Odoo 19
December 31, 2025by
admin
A Complete Guide to Transient Models (Wizards) in Odoo 19
Introduction
In Odoo development, there are many scenarios where user input is needed only for a short time. This input is processed for tasks such as validating actions, applying discounts, importing records, checking privacy details, or sending emails, and then it is no longer required. Since this data does not need to be stored permanently in the database, Odoo provides a special solution called Transient Models.
Transient models are designed to handle temporary data. They are lighter and faster compared to regular models, and Odoo automatically removes their records after a certain period. Because of this behavior, transient models are commonly used in wizard forms and for short-term user interactions.
What is a Transient Model A Transient Model is a temporary data model used by Odoo to store short-lived information. These models are most often used in wizard forms, which appear as pop-up windows where users enter data that triggers specific actions.
Main Features of Transient Models
Temporary Data Storage Transient models are used to store data only for a short period. The records are not meant to be permanent and are automatically removed by Odoo after some time.
Automatic Cleanup Odoo automatically deletes records created in transient models, so developers do not need to manage data cleanup manually.
Used in Wizard Forms Transient models are commonly used in wizard forms (pop-up windows) where users enter information to perform specific actions.
Lightweight and Fast Compared to regular models, transient models are lightweight, making them faster and more efficient for short-term operations.
No Long-Term Database Impact Since the data is temporary, transient models do not clutter the database with unnecessary records.
Action-Oriented The main purpose of a transient model is to collect input and trigger actions such as validations, updates, imports, or email sending.
Implementation
Step 1: Define the Transient Model
Create a new Python file named rejection_wizard.py inside the wizard folder of your module.
from odoo import api, fields, models, _
class EmployeeRejectionWizard(models.TransientModel):
Odoo handles the cleanup of wizard records using its internal method:
@api.autovacuum
def _transient_vacuum(self):
The @api.autovacuum decorator marks methods to be executed automatically by Odoo’s autovacuum system.
In transient models, the _transient_vacuum() method is responsible for deleting outdated or temporary wizard records.
Developers don’t need to manually remove these records — Odoo performs this cleanup automatically, keeping the database clean and ensuring optimal performance.
Conclusion
Transient models in Odoo are designed to store temporary data during user interactions. They do not require long-term storage and are commonly used to display information through wizards. By handling short-lived data efficiently, transient models allow developers to build smooth and effective workflows without worrying about manual data cleanup, as Odoo’s autovacuum system automatically removes these records. Understanding transient models helps developers create lightweight, user-friendly, and easy-to-maintain features that enhance the overall Odoo experience.
If you are looking for an ERP implementation
partner with diverse industry experience feel free to contact us. We
have proven track record of successful implementations across various
sectors including Odoo for Manufacturing, Odoo for Trading, Odoo for
FMCG, Odoo for Oil & Gas, Odoo for Diary, Odoo for Pharma, Odoo for
Cosmetic Clinic, Odoo for Contracting Companies, Odoo for HVAC, Odoo for
Logistics, Odoo for Automobile, Odoo for Laundry, Odoo for Field
Service, Odoo for E-Commerce & many more
ZestyBeanz offers Developer / Consultant outsourcing programs, Chat with us in Whatsapp and Hire Odoo Developers, Mobile Application Developers, Consultants.