Graph and pivot views

Graph views provide a graphical view of the data, in the form of a chart. The current fields available in the To-Do Tasks are not good candidates for a chart, so we will add one to use on such a view.

In the TodoTask class, at the todo_stage/models/todo_task_model.py file, add:

effort_estimate = fields.Integer('Effort Estimate') 

It also needs to be added to the To-Do Task form, so that we can add values for it on the existing records and are able to check this new view.

Now let's add the To-Do Tasks graph view:

<record id="view_graph_todo_task" model="ir.ui.view"> <field name="model">todo.task</field> <field name="arch" type="xml"> <graph type="bar"> <field name="stage_id" /> <field name="effort_estimate" type="measure" ...

Get Odoo 11 Development Essentials - Third 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.