Chapter 9. Module Data

In this chapter, we will cover the following topics:

  • Using external IDs and namespaces
  • Loading data using XML files
  • Using the noupdate and forcecreate flags
  • Loading data using CSV files
  • Loading data using YAML files
  • Addon updates and data migration

In order not to have to repeat a lot of code, we'll make use of the models defined in Chapter 4, Application Models. So in order to follow the examples, grab this chapter's code.

Introduction

In this chapter, we'll look at how addons can provide data at installation time. This is useful for providing default values and adding metadata such as view descriptions, menus, or actions. Another important usage is providing demonstration data, which is loaded when the database is created with ...

Get Odoo Development Cookbook 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.