summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2018-05-30 12:33:09 +0200
committerGéry Debongnie <ged@odoo.com>2018-05-31 10:36:58 +0200
commit5b19d05a9acd81c81d8ca29ea9701849efc98c37 (patch)
tree362b19ddf0af7a5b52d18924093fa800f48ef180 /doc/reference
parent241e67b788c055767e0261262b94313ea1228adb (diff)
[DOC] add documentation for the new cohort view
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/views.rst41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/reference/views.rst b/doc/reference/views.rst
index 0a541f162ea..55ebc080844 100644
--- a/doc/reference/views.rst
+++ b/doc/reference/views.rst
@@ -1287,6 +1287,47 @@ There are 5 possible type of tags in a dashboard view:
The number of columns spanned by this tag (only makes sense inside a
group). By default, 1.
+Cohort
+=========
+
+The cohort view is used to display and understand the way some data changes over
+a period of time. For example, imagine that for a given business, clients can
+subscribe to some service. The cohort view can then display the total number
+of subscriptions each month, and study the rate at which client leave the service
+(churn).
+
+.. warning::
+
+ The Cohort view is only available in Odoo Enterprise.
+
+For example, here is a very simple cohort view:
+
+.. code-block:: xml
+
+ <cohort string="Subscripdtion" date_start="date_start" date_stop="date" interval="month"/>
+
+The root element of the Cohort view is <cohort>, it accepts the following
+attributes:
+
+
+- ``string`` (mandatory)
+ A title, which should describe the view
+
+- ``date_start`` (mandatory)
+ A valid date or datetime field. This field is understood by the view as the
+ beginning date of a record
+
+- ``date_stop`` (mandatory)
+ A valid date or datetime field. This field is understood by the view as the
+ end date of a record. This is the field that will determine the churn.
+
+- ``interval`` (optional)
+ A string to describe a time interval. It should be 'day', 'week', 'month''
+ (default) or 'year'.
+
+- ``measure`` (optional)
+ A field that can be aggregated. This field will be used to compute the values
+ for each cell. If not set, the cohort view will count the number of occurences.
Search
======