Generic view declaration is most important part of Odoo module. Here a view is declared as a record of the model ir.ui.view. The view type is implied by the root element of the arch field.
For example code is below.
<record model="ir.ui.view" id="view_id">
<field name="name">view.name</field>
<field name="model">object_name</field>
<field name="priority" eval="16">
<field name="arch" type="xml">
<!-- view content: <form>, <tree>, <graph>, ... -->
</field>
</field></record>
},
});
Note-The arch field must be declared as type="xml" to parsed correctly.
0 Comment(s)