[IMP] web: add buttons in control panel in kanban

closes odoo/documentation#3257

Taskid: 3082390
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
FrancoisGe 2023-01-18 07:34:15 +00:00 committed by Antoine Vandevenne (anv)
parent 5457a07a4e
commit 37146744a0
2 changed files with 35 additions and 24 deletions

View File

@ -1726,6 +1726,13 @@ Possible children of the view element are:
Enables the 'quick create' and 'drag and drop' features when the kanban
view is grouped by that field. Default: false.
.. include:: views/header_buttons.rst
.. note::
Currently, only the ``always`` option is usable because it is not yet possible
to select records in a kanban view. This should happen soon.
``progressbar``
declares a progressbar element to put on top of kanban columns.
@ -2065,30 +2072,7 @@ 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 <reference/views/list/button>` in the control panel that perform an action/call a model's method.
.. code-block:: xml
<header>
<button name=toDo" type="object" string="Always Display" display="always"/>
<button name="toDo" type="object" string="Selection Display"/>
</header>
Does not support any attribute but can have a child:
.. rst-class:: o-definition-list
``button``
as a :ref:`button <reference/views/list/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.
.. include:: views/header_buttons.rst
``control``
defines custom controls for the current view.

View File

@ -0,0 +1,27 @@
.. rst-class:: o-definition-list
``header``
defines custom buttons similar to :ref:`list view buttons <reference/views/list/button>` in the control panel
that perform an action/call a model's method.
.. code-block:: xml
<header>
<button name="toDoAlways" type="object" string="Always displayed" display="always"/>
<button name="toDoSelection" type="object" string="Displayed if selection"/>
</header>
Does not support any attribute but can have children:
.. rst-class:: o-definition-list
``button``
as a :ref:`list view button <reference/views/list/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.