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" ...