summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorRomainLibert <rli@odoo.com>2018-07-10 13:02:35 +0200
committerRomainLibert <rli@odoo.com>2018-07-11 13:47:01 +0200
commit8a21e27377bb65c03ca9b4a67b228ce21519a3e9 (patch)
treefec978aa89d94377f71edbc9aa14c2a68a35c064 /doc/reference
parentc002e2eb379e8a3db90b45269f8ff2b7e246c8b2 (diff)
[IMP] web: add auto sorting on pivot view
We add the attribute default_order on the pivot view (already present in graph view), this attribute will sort the pivot view on the given measure. Closes: #25675
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/views.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/reference/views.rst b/doc/reference/views.rst
index f91dbbaba21..524ce783be8 100644
--- a/doc/reference/views.rst
+++ b/doc/reference/views.rst
@@ -826,6 +826,15 @@ element is ``<pivot>`` which can take the following attributes:
Set to ``True`` to remove table cell's links to list view.
``display_quantity``
Set to ``true`` to display the Quantity column by default.
+``default_order``
+ The name of the measure and the order (asc or desc) to use as default order
+ in the view.
+
+ .. code-block:: xml
+
+ <pivot default_order="foo asc">
+ <field name="foo" type="measure"/>
+ </pivot>
The only allowed element within a pivot view is ``field`` which can have the
following attributes: