O'Reilly logo

Odoo Development Cookbook by Daniel Reis, Alexandre Fayolle, Holger Brunn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Document-style forms

In this recipe, we'll review some design guidelines in order to present a uniform user experience.

How to do it...

  1. Start your form with a header element:
    <header>
        <button name="do_something_with_the_record"
                string="Do something" type="object" class="oe_highlight" />
        <button name="do_something_else" string="Second action" />
        <field name="state" widget="statusbar" />
    </header>
  2. Then add a sheet element for content:
    <sheet>
  3. Put some prominent field(s) first:
        <div class="oe_left oe_title">
            <label for="name" />
            <h1>
                <field name="name" />
            </h1>
        </div>
  4. Put buttons that link to resources relevant for the object in its own box (if applicable):
     <div class="oe_right oe_button_box" name="buttons"> <button name="open_something_interesting" string="Open ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required