What is TransientModel class

TransientModel is a class that stores data in the database temporary and it is automatically cleaned up on a defined period of time. Full description of this class added by Odoo in the code is:

Model super-class for transient records meant to be temporarily
persisted, and regularly vacuum-cleaned.
A TransientModel has a simplified access rights management,
all users can create new records, and may only access the
records they created. The super-user has unrestricted access
to all TransientModel records.
source

Also, when you work with this type of class take into consideration that Many2one relations are forbidden with a non-transient model.

The scheduled action to clean up the database is named “AutoVacuum osv_memory objects” in Odoo 8 and “Auto-vacuum internal data” in Odoo 9. You can find it inĀ Settings >> Technical >> Automation >> Schedule Actions

This type of model is mostly used for creating wizards in Odoo.

Leave a Reply

Your email address will not be published.