summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2019-07-04 07:40:18 +0000
committerAaron Bohy <aab@odoo.com>2019-07-19 08:39:07 +0000
commitdd7022eccd99b5ba9688f63b517d23c405f23797 (patch)
tree2e1d786ec1527a027ac2df693f21a3d6ddb131ee /doc/reference
parent38b5a666c50d47a0efe060c031d68a2d70689dc6 (diff)
[IMP] base,web*: searchpanel in all multi record views
Before this rev. the searchpanel could only be activated in kanban views (and it was specified in the kanban arch). From now on, the searchpanel can be activated in any multi record view. It's arch is moved to the search view arch (inside the <searchpanel> tag). Task 1985921 Co-authored-by: Aaron Bohy <aab@odoo.com>
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/views.rst107
1 files changed, 56 insertions, 51 deletions
diff --git a/doc/reference/views.rst b/doc/reference/views.rst
index eb94a707c77..8b632bba228 100644
--- a/doc/reference/views.rst
+++ b/doc/reference/views.rst
@@ -1134,57 +1134,6 @@ Possible children of the view element are:
* kanban-specific CSS
* kanban structures/widgets (vignette, details, ...)
-``searchpanel``
- allows to display a search panel on the left of the kanban view.
- This tool allows to quickly filter data on the basis of given fields. The fields
- are specified as direct children of the ``searchpanel`` with tag name ``field``,
- and the following attributes:
-
- * ``name`` (mandatory) the name of the field to filter on
-
- * ``select`` determines the behavior and display. Possible values are
-
- ``one`` (default) at most one value can be selected. Supported field types are
- many2one and selection.
-
- ``multi`` several values can be selected (checkboxes). Supported field
- types are many2one, many2many and selection.
-
- * ``groups``: restricts to specific users
-
- * ``string``: determines the label to display
-
- * ``icon``: specifies which icon is used
-
- * ``color``: determines the icon color
-
- Additional optional attributes are available in the ``multi`` case:
-
- * ``domain``: determines conditions that the comodel records have to satisfy.
-
- A domain might be used to express a dependency on another field (with select="one")
- of the search panel. Consider
-
- .. code-block:: xml
-
- <searchpanel>
- <field name="department_id"/>
- <field name="manager_id" select="multi" domain="[('department_id', '=', department_id)]"/>
- <searchpanel/>
-
- In the above example, the range of values for manager_id (manager names) available at screen
- will depend on the value currently selected for the field ``department_id``.
-
- * ``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.
-
-
If you need to extend the Kanban view, see :js:class::`the JS API <KanbanRecord>`.
.. _reference/views/calendar:
@@ -1951,6 +1900,62 @@ Possible children elements of the search view are:
``group``
can be used to separate groups of filters, more readable than
``separator`` in complex search views
+``searchpanel``
+ allows to display a search panel on the left of any multi records view.
+ By default, the list and kanban views have the searchpanel enabled.
+ The search panel can be activated on other views with the attribute:
+
+ * ``view_types`` a comma separated list of view types on which to enable the search panel
+
+ default: 'tree,kanban'
+
+ This tool allows to quickly filter data on the basis of given fields. The fields
+ are specified as direct children of the ``searchpanel`` with tag name ``field``,
+ and the following attributes:
+
+ * ``name`` (mandatory) the name of the field to filter on
+
+ * ``select`` determines the behavior and display. Possible values are
+
+ ``one`` (default) at most one value can be selected. Supported field types are
+ many2one and selection.
+
+ ``multi`` several values can be selected (checkboxes). Supported field
+ types are many2one, many2many and selection.
+
+ * ``groups``: restricts to specific users
+
+ * ``string``: determines the label to display
+
+ * ``icon``: specifies which icon is used
+
+ * ``color``: determines the icon color
+
+ Additional optional attributes are available in the ``multi`` case:
+
+ * ``domain``: determines conditions that the comodel records have to satisfy.
+
+ A domain might be used to express a dependency on another field (with select="one")
+ of the search panel. Consider
+
+ .. code-block:: xml
+
+ <searchpanel>
+ <field name="department_id"/>
+ <field name="manager_id" select="multi" domain="[('department_id', '=', department_id)]"/>
+ <searchpanel/>
+
+ In the above example, the range of values for manager_id (manager names) available at screen
+ will depend on the value currently selected for the field ``department_id``.
+
+ * ``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: