So far in this book, we have used XML IDs in areas such as views, menus, and actions. However, we haven't seen what an XML ID actually is. This recipe will give you a deeper understanding.
Using external IDs and namespaces
How to do it...
We will write in the already-existing records to demonstrate how to use cross-module references:
- Add a data file to your module manifest:
'data': [ 'data/data.xml', ],
- Change the name of the main company:
<record id="base.main_company" model="res.company"> <field name="name">Packt publishing</field> </record>
- Set the main company's partner as a publisher:
<record id="...