Smart buttons

It's not uncommon for document forms to have a smart button area in the top-right section. Smart buttons are shown as rectangles with a statistic indicator that can be followed through when clicked.

The UI pattern used in Odoo is to have an invisible box where smart buttons are placed. This button box is usually the first element in the <sheet>, added just before the <div class="oe_title">  element (and avatar image), and looks like this:

<div name="button_box" class="oe_button_box">
 <!-- Smart buttons will go here... -->
</div>

The container for the buttons is just a div element with the oe_button_box class. In Odoo versions before 11.0, you might need to also add the oe_right class to ensure that the button box stays aligned ...

Get Odoo 12 Development Essentials - Fourth 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.