Managing Module Data
In Odoo, managing module data involves various tasks such as creating, updating, and deleting records in a database upon installation, upgrade, or removal of a module. This is typically done through XML files called data files.
We’ll study how add-on modules might offer data during installation in this chapter. This helps us when we provide metadata, such as view descriptions, menus, or actions, or when we provide default settings. Another important usage is providing demonstration data, which is loaded when a database is created with the Load demonstration data checkbox checked.
In this chapter, we will cover the following topics:
- Using external IDs and namespaces
- Loading data using XML files
- Using the
noupdate
andforcecreate
flags - Loading data using CSV files
- Add-on updates and data migration
- Deleting records from XML files
- Invoking functions from XML files