Module data

Modules use data files to load their default data, demonstration data, user interface definitions, and other configurations into the database. This can be done using both CSV and XML files.

For completeness, the YAML file format can also be used, but it is seldom used to load data, and we won't discuss it. In fact, it is scheduled for deprecation in Odoo 12. Still, for a usage example you can look at the l10n_be official module, and for information on the YAML format visit: http://yaml.org/.

CSV files used by modules are exactly the same as those we have seen and used for the import feature. When using them in modules, the filename must match the name of the model to which the data will be loaded. For example, a CSV file loading ...

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.