Odoo 12 Development Essentials
上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 data fields.

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

<form> 
  <header> 
    <!-- Buttons will go here --> 
  </header> 
  <sheet> 
    <!-- Content goes here: --> 
    <group>
<field name="name" />
<field name="author_ids" widget="many2many_tags" />
<field name="publisher_id" />
<field name="date_published" />
<field name="isbn" />
<field name="active" />
<field name="image" widget="image" />
</group>
</sheet> </form>