Loading data using CSV files
While you can do everything you need to with XML files, this format is not the most convenient when you need to provide larger amounts of data, especially given that many people are more comfortable preprocessing data in Calc or other spreadsheet software. Another advantage of the CSV format is that it is what you get when you use the standard export function. In this recipe, we'll take a look at importing table-like data.
How to do it...
Traditionally, access-control lists (ACLs – refer to Chapter 10, Security Access) are a type of data that is loaded through CSV files:
- Add
security/ir.model.access.csv
to your data files:'data': [ ... 'security/ir.model.access.csv', ],
- Add an ACL for our books in this file (we already have a few records from the Adding access security recipe from Chapter 3, Creating Odoo Add-On Modules):
id,name,model_id:id,group_id:id...