- Define a graph view using bars:
<record id="graph_project_task_bar" model="ir.ui.view"> <field name="model">project.task</field> <field name="arch" type="xml"> <graph type="bar"> <field name="project_id" type="row" /> <field name="user_id" type="row" /> <field name="effective_hours" type="measure" /> </graph> </field> </record>
- Define a pivot view:
<record id="graph_project_task_pivot" model="ir.ui.view"> <field name="model">project.task</field> <field name="arch" type="xml"> <pivot> <field name="project_id" type="row" /> <field name="user_id" type="row" /> <field name="planned_hours" type="measure" /> <field name="effective_hours" type="measure" />
</pivot> </field> </record>
- Add menus and actions using this view. This is left as an exercise for the reader.
If everything went well, you should see graphs that show you how many hours were worked per customer (the projects we defined) under the responsibility of the different project managers.