Grouping content in a form

The main content of the form should be organized using <group> tags.

The <group> tag inserts two columns in the canvas. Inside it, by default fields will be displayed along with their label, thus taking up these two columns. So, each field takes up a line, the next fields will take the next line, and they will be stacked up vertically.

A common pattern in Odoo forms is to have two columns of fields with labels, side by side. To achieve that we just need to add two <group> tags nested into the top one.

Try the Toggle Form Layout Outline option from the Developer menu: it draws lines around each group section, allowing for a better understanding of the current form layout.

Continuing with our form view, we will use ...

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.