Akhil Mathew
Akhil Mathew

Reputation: 1659

How to link or connect two XML files used in Odoo

Currently, I am working on ODOO. During my project, I have to use various XML files. I tried to link two XML files using id's but it showed External id not found. So how can I access the fields of one XML file in another XML file or how can I connect these two XML files.

Upvotes: 0

Views: 649

Answers (2)

Alessandro Ruffolo
Alessandro Ruffolo

Reputation: 1575

You need to specify the module name

module='example' File1.xml

...
<record id="record_id_1">
    ... 
</record>

File 2.xml

...
<record id="record_id_2">
    <field name="inherit_id" ref="example.record_id_1"/>
    ... 
</record>

if you already did it but it doesn't work, post your code.

Upvotes: 1

Kenly
Kenly

Reputation: 26698

Maybe you forgot to use module name:

<field name="inherit_id" ref="module_name.xml_id"/>

Upvotes: 2

Related Questions