December 2018
Beginner to intermediate
404 pages
10h 14m
English
Graph views present charts with data aggregations. We can use bar, line, and pie charts.
Now let's add the library checkout graph view:
<record id="view_graph_checkout" model="ir.ui.view">
<field name="model">library.checkout</field>
<field name="arch" type="xml">
<graph type="bar">
<field name="stage_id" />
<field name="num_books" type="measure" />
</graph> </field>
</record>
The graph view element can have a type attribute that can be set to bar (the default), pie, or line. In the case of bar, the additional stacked="True" can be used to make it a stacked bar chart.
The graph uses two types of fields:
Read now
Unlock full access