diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-11-05 20:30:40 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-11-05 20:30:40 +0100 |
| commit | 5068cffbb043d7284014dcdd03b1794250631bc0 (patch) | |
| tree | 9b942d8f8e193323aeb42665eab998f6831f1992 /addons/web_graph | |
| parent | 9c57268a4b191341c5c1377ec0b6e1f11c37c5cd (diff) | |
| parent | 491372e865948765fdce241c7429419204ce6406 (diff) | |
[MERGE] forward port of branch 8.0 up to 491372e
Diffstat (limited to 'addons/web_graph')
| -rw-r--r-- | addons/web_graph/doc/index.rst | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/addons/web_graph/doc/index.rst b/addons/web_graph/doc/index.rst index be5c0a9f88c..8305dddfc44 100644 --- a/addons/web_graph/doc/index.rst +++ b/addons/web_graph/doc/index.rst @@ -103,7 +103,7 @@ The order is important: for example if two fields are grouped by row, then the f Date/datetime ------------- -Dates and datetimes are always a little tricky. There is a special syntax for grouping them by intervals. +Dates and datetimes are always a little tricky. There is a special syntax for grouping them by intervals. Most of the time, the interval can be specified as a suffix: * field_date:day, * field_date:week, @@ -115,13 +115,18 @@ For example, .. code-block:: xml + <filter string="Week" context="{'group_by':'date_followup:week'}" help="Week"/> + +But to describe a graph view in xml, this would fail the xml validation ("date_followup:week" is not a valid field). In that case, the graph view can be described with an "interval" attribute. For example, + +.. code-block:: xml + <graph string="Leads Analysis" type="pivot" stacked="True"> - <field name="date_deadline:week" type="row"/> + <field name="date_deadline" interval="week" type="row"/> <field name="stage_id" type="col"/> <field name="planned_revenue" type="measure"/> </graph> - Example: -------- Here is an example of a graph view defined for the model *crm.lead.report*. It will open in pivot table mode. If it is switched to bar chart mode, the bars will be stacked. The data will be grouped according to the date_deadline field in rows, and the columns will be the various stages of an opportunity. Also, the *planned_revenue* field will be used as a measure. |
