summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMathieu Duckerts-Antoine <dam@odoo.com>2020-04-28 12:43:30 +0000
committerMathieu Duckerts-Antoine <dam@odoo.com>2020-05-05 19:23:20 +0000
commit2c102c292f22f5d400d8caf779428fdc55c15e43 (patch)
tree6436980060455bd35619672d5e0ba693551e3902 /doc
parentc19dcf3983c797d82cd808d9701e190aee619af2 (diff)
[IMP] web: search panel counter changes
This commit introduces several changes in the search panel with respect to record counts: - the record counts are now also available for the fields with select="one" attribute (if not disabled explicitely). - the record counts are better computed using the idea that selected values within a group should not impact the counts for the group values but only the counts for the other group values. On the way we have changed two keys in the values returned by the server: - 'count' becomes '__count'. It has been done to avoid a possible clash in case a model would have a field named 'count' and that the field values would be wanted for some reason. - 'name' (multi case) becomes 'display_name'. It has been done in order to make the select one and multi cases more similar and factorize some code. TASK-ID: 2166814 Co-authored-by: Raphaƫl Collet <rco@openerp.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Alexis Lacroix <laa@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/views.rst13
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/reference/views.rst b/doc/reference/views.rst
index 4dad4a4f726..a0253e321e9 100644
--- a/doc/reference/views.rst
+++ b/doc/reference/views.rst
@@ -1988,6 +1988,13 @@ Possible children elements of the search view are:
* ``color``: determines the icon color
+ * ``disable_counters``: default is false. If set to true the counters won't be computed.
+
+ This feature has been implemented in case performances would be too bad.
+
+ Another way to solve performance issues is to properly override the
+ ``search_panel_select_range`` and ``search_panel_select_multi_range`` methods.
+
Additional optional attributes are available in the ``multi`` case:
* ``domain``: determines conditions that the comodel records have to satisfy.
@@ -2007,12 +2014,6 @@ Possible children elements of the search view are:
* ``groupby``: field name of the comodel (only available for many2one and many2many fields). Values will be grouped by that field.
- * ``disable_counters``: default is false. If set to true the counters won't be computed.
-
- This feature has been implemented in case performances would be too bad.
-
- Another way to solve performance issues is to properly override the
- ``search_panel_select_multi_range`` method.
.. _reference/views/search/defaults: