Using the data model in Chapter 5, Application Models, we'll add a book and an author as demonstration data. We'll also 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 a file called data/demo.xml to your manifest, in the demo section:
'demo': [ 'data/demo.xml', ],
- Add the following content to this file:
<odoo>
<record id="author_pga" model="res.partner">
<field name="name">Parth Gajjar</field>
</record> <record id="author_af" model="res.partner"> ...