How to do it...

  1. Start your form with a header element:
<header>
<button type="object" name="open_commercial_entity"
string="Open commercial partner"
class="btn-primary" />
</header>
  1. Add a sheet element for content:
<sheet> 
  1. Put in the stat button, which will be used to archive the record:
<div class="oe_button_box" name="button_box">
<button name="toggle_active"
type="object" class="oe_stat_button"
icon="fa-archive">
<field name="active" widget="boolean_button"
options="{'terminology': 'archive'}"/>
</button>
</div>
  1. Add some prominent field(s):
<div class="oe_left oe_title">
<label for="name" />
<h1>
<field name="name" />
</h1>
</div>
  1. Add your content, You can use a notebook if there are a lot of fields:
<group>
<field name="category_id" widget="many2many_tags" />
<field name="email"/>
<field name="mobile"/>
</group>
  1. After the sheet, add the chatter widget (if applicable):
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset