Defining the cohort view
For the cohort analysis of records, the new cohort view was added in Odoo version 12. The cohort view is used to find out the life cycle of a record over a particular time span. With the cohort view, you can see the churn and retention rate of any object for a particular time.
Getting ready
The cohort
view is part of the Odoo Enterprise edition, so you cannot use it with only the Community edition. If you are using the Enterprise edition, you need to add web_cohort
in the manifest file of your module. For our example, we will create a view to see the cohort analysis for tasks.
How to do it...
Follow these steps to add the cohort
view for the project.task
model:
- Define a
cohort
view:<record id="view_project_tasks_graph" model="ir.ui.view"> Â Â Â Â <field name="name">project task cohort</field> Â Â Â Â <field name="model">project.task</field...