Reputation: 6403
The code below is a snippet from an OpenERP xml form definition.
<record model="ir.ui.view" id="direct_supplier_invoice_form">
<field name="name">direct_supplier.invoice.form</field>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="inherit_id" eval="False" />
<field name="priority">250</field>
<field name="arch" type="xml">
It has two fields that seem very similair:
id="direct_supplier_invoice_form"
<field name="name">direct_supplier.invoice.form</field>
What is the specific purpose of these two fields?
Upvotes: 0
Views: 216
Reputation: 1004
that's an XML code...
Name refers to the name of the field or record
while ID refers to its reference name so that whenever you are going to access the particular record or field you will have to use its ID.
Upvotes: 0
Reputation: 14776
name: is simply the name of the record (field name)
id: is also called xml_id, it's like a name for the records id. Why is there a name for an id? So you can reference to that id by name instead of numbers (which can vary from installation to installation). Where are these names saved in db? Just look into table ir_model_data.
I bet you've already used these id-names for references :-)
Upvotes: 2