Title and subtitle

Fields outside a <group> element don't automatically have labels rendered for them. This will be the case for the title elements, so the <label for="..."/> element should be used to render it. At the expense of some extra work, this has the advantage of giving us more control over the label display.

Regular HTML, including CSS-style elements, can also be used to make the title shine. Usually, titles are placed inside a <div> with the oe_title class.

Here is the <sheet> element expanded to include the title plus some additional fields as subtitles:

<sheet> <div class="oe_title"> <label for="name" class="oe_edit_only"/> <h1><field name="name"/></h1> <h3> <span class="oe_read_only">By</span> <label for="user_id" class="oe_edit_only"/> ...

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.