Using the data model in Chapter 5, Application Models, we'll add a book and an author as demonstration data, while we add a well-known publisher as normal data in our module.
Loading data using XML files
How to do it...
Create two XML files and link them in your __manifest__.py file:
- Add in a file called data/demo.xml to your manifest, in the demo section:
'demo': [ 'data/demo.xml', ],
- Add content to this file:
<odoo> <record id="author_af" model="res.partner"> <field name="name">Alexandre Fayolle</field> </record> <record id="author_dr" model="res.partner"> ...