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 (and readonly, required) attributes with a domain expression — t-if is not allowed in form views.
  • In search views, the expand attribute and string="Group By" on <group> were removed.

Need a hand with this? company@everjust.co — a human answers.