Transient and Abstract models

In the preceding code and in the vast majority of Odoo models, classes are based on the models.Model class. These types of model have permanent database persistence: database tables are created for them and their records are stored until explicitly deleted.

But Odoo also provides two other model types to be used: Transient and Abstract models.

Transient models are based on the models.TransientModel class and are used for wizard-style user interaction. Their data is still stored in the database, but it is expected to be temporary. A vacuum job periodically clears old data from these tables. For example, the Load a Language dialog window, found in the Settings | Translations menu, uses a Transient model to store ...

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.