Transient and abstract models
In the preceding code, and in most 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.
However, 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 user selections ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access