December 2018
Beginner to intermediate
404 pages
10h 14m
English
When viewing a model in list mode, a <tree> view is used. Tree views are capable of displaying lines organized in hierarchies, but most of the time, they are used to display plain lists.
We can add the following <tree> view definition to book_view.xml:
<record id="view_tree_book" model="ir.ui.view">
<field name="name">Book List</field>
<field name="model">library.book</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="author_ids" widget="many2many_tags" /> <field name="publisher_id"/>
<field name="date_published"/>
</tree> </field> </record>
This defines a list with four columns: name, author_ids, publisher_id, and date_published.
At the top-right corner of the list, Odoo displays ...
Read now
Unlock full access