Views
Views are XML that describe how a model appears: lists, forms, kanban boards, and search panels.
A form view
<record id="my_lead_form" model="ir.ui.view">
<field name="name">my.lead.form</field>
<field name="model">my.lead</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="name"/>
<field name="partner_id"/>
<field name="expected"/>
<field name="stage"/>
</group>
</sheet>
</form>
</field>
</record>
A list view
<record id="my_lead_list" model="ir.ui.view">
<field name="name">my.lead.list</field>
<field name="model">my.lead</field>
<field name="arch" type="xml">
<list>
<field name="name"/>
<field name="stage"/>
<field name="expected"/>
</list>
</field>
</record>
Version 19 notes
- The list view root element is
<list>(the old<tree>is gone). - Conditional display uses the
invisible(andreadonly,required) attributes with a domain expression —t-ifis not allowed in form views. - In search views, the
expandattribute andstring="Group By"on<group>were removed.
Related
- Open a view from a menu — Actions & menus.
Need a hand with this? company@everjust.co — a human answers.