Odoo 11 Development Essentials(Third Edition)
上QQ阅读APP看书,第一时间看更新

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>