O'Reilly logo

Odoo Development Essentials by Daniel Reis

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

List views

Compared to form views, list views are much simpler. A list view can contain fields and buttons, and most of their attributes for forms are also valid here.

Here is an example of a list view for our To-do Tasks:

<record id="todo_app.view_tree_todo_task" model="ir.ui.view">
  <field name="name">To-do Task Tree</field>
  <field name="model">todo.task</field>
  <field name="arch" type="xml">
    <tree editable="bottom"
          colors="gray:is_done==True"
          fonts="italic: state!='open'" delete="false">
      <field name="name"/>
      <field name="user_id"/>
    </tree>
   </field>
</record>

The attributes for the tree top element are:

  • editable: makes the records editable directly on the list view. The possible values are top and bottom, the location where new records will be added. ...

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