- Define the basic structure of the form view:
<record id="form_all_customers" model="ir.ui.view"> <field name="name">All customers</field> <field name="model">res.partner</field> <field name="arch" type="xml"> <form> <!--form content goes here --> </form> </field> </record>
- To add a head bar, which is usually used for action buttons and stage pipeline, add this inside the form:
<header>
<button type="object" name="open_commercial_entity"
string="Open commercial partner"
class="btn-primary" />
</header>
- Add fields to the form, using group tags to organize them visually:
<group string="Content" name="my_content"> <field name="name" /> <field name="category_id" widget="many2many_tags" /> </group>
Now, the form should display a top bar with a button and two vertically-aligned fields.