From e045da51b3cd77a68ccabaa25eefba8c1f8870d2 Mon Sep 17 00:00:00 2001 From: FrancoisGe Date: Mon, 28 Nov 2022 09:06:54 +0000 Subject: [PATCH] [IMP] web: adds the header to the list view This commit adds the documentation related to the
tag to the list view. closes odoo/documentation#3044 Related: odoo/odoo#106519 Related: odoo/enterprise#34387 Signed-off-by: Antoine Vandevenne (anv) --- content/developer/reference/backend/views.rst | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/content/developer/reference/backend/views.rst b/content/developer/reference/backend/views.rst index b3e5e6cdf..724acae51 100644 --- a/content/developer/reference/backend/views.rst +++ b/content/developer/reference/backend/views.rst @@ -1918,6 +1918,8 @@ Possible children elements of the list view are: matching the current search) ``name`` see ``type`` + ``groups`` + lists the groups which should be able to see the button ``args`` see ``type`` ``attrs`` @@ -2049,6 +2051,31 @@ Possible children elements of the list view are: A special button (`type="edit"`) can be defined to open the many2one form view. +``header`` + defines custom :ref:`buttons ` in the control panel that perform an action/call a model's method. + + .. code-block:: xml + +
+
+ + Does not support any attribute but can have a child: + + .. rst-class:: o-definition-list + + ``button`` + as a :ref:`button ` which accepts an extra attribute when placed in a `header`: + + .. rst-class:: o-definition-list + + ``display`` + By default, those buttons are only displayed when some records are + selected, and they apply on the selection. When the attribute ``display`` + is set to ``always``, the button is available all the time, even if there's + no selection. + ``control`` defines custom controls for the current view.