Demonstration data
Odoo add-on modules may install demonstration data, and it is considered good practice to do so. This is useful for providing usage examples for a module and the datasets to be used in tests. Demonstration data for a module is declared using the demo attribute of the __manifest__.py manifest file. Just like the data attribute, it is a list of filenames with the corresponding relative paths inside the module.
We should add some demonstration data to our library.book module. An easy way to do this is to export some data from the development database with the module installed.
The convention is to place data files in a data/ subdirectory. We should save these data files in the library_app add-on module as data/library.book.csv ...
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