There was a lot of talk about XML IDs already, without specifying what an XML ID is. This recipe will give a deeper understanding of this.
Using external IDs and namespaces
How to do it...
We write into the already existing records to demonstrate how to use cross-module references:
- Add a data file to your module manifest:
'data': [ 'data/res_partner.xml', ],
- Change the name of our main company:
<record id="base.main_company" model="res.company"> <field name="name">Packt publishing</field> </record>
- Set our main company's partner as publisher:
<record id="book_cookbook" model="library.book">...