Business document form views

The preceding section provided a basic form view, but we can make some improvements to it. For document models, Odoo has a presentation style that mimics a paper page. This form contains two elements: <header> to contain action buttons and <sheet> to contain the data fields.

We can now replace the basic <form> defined in the previous section with this one:

<form> 
  <header> 
  <!-- Buttons go here--> 
  </header> 
  <sheet> 
    <!-- Content goes here: --> 
    <group>
      <field name="name"/> 
      <field name="is_done"/>
      <field name="active" readonly="1"/>
    </group>
  </sheet> 
</form> 

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.