Using groups to organize forms

The <group> tag allows you to organize the form content. Placing <group> elements inside a <group> element creates a two-column layout inside the outer group. Group elements are advised to have a name attribute so that its easier for other modules to extend them.

We will use this to better organize our content. Let's change the <sheet> content of our form to match this:

<sheet> 
  <group name="group_top"> 
    <group name="group_left"> 
      <field name="name" />      <field name="user_id" />
      <field name="is_done" />    </group> 
    <group name="group_right"> 
      <field name="date_deadline" /> 
      <field name="team_ids" widget="many2many_tags" />      <field name="active" readonly="1" /> 
    </group> 
  </group> 
</sheet> 

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.