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 hostel room category.
How to do it...
Follow these steps to add the cohort
view for the hostel.room.category
model:
- Define a
cohort
view:<record id="hostel_room_category_view_cohort" model="ir.ui.view"> Â Â Â Â <field name="name">Hostel Room Categories Cohort</field> Â Â Â Â <field name="...