[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:
parent
5457a07a4e
commit
37146744a0
@ -1726,6 +1726,13 @@ Possible children of the view element are:
|
|||||||
Enables the 'quick create' and 'drag and drop' features when the kanban
|
Enables the 'quick create' and 'drag and drop' features when the kanban
|
||||||
view is grouped by that field. Default: false.
|
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``
|
``progressbar``
|
||||||
declares a progressbar element to put on top of kanban columns.
|
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.
|
A special button (`type="edit"`) can be defined to open the many2one form view.
|
||||||
|
|
||||||
``header``
|
.. include:: views/header_buttons.rst
|
||||||
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.
|
|
||||||
|
|
||||||
``control``
|
``control``
|
||||||
defines custom controls for the current view.
|
defines custom controls for the current view.
|
||||||
|
27
content/developer/reference/backend/views/header_buttons.rst
Normal file
27
content/developer/reference/backend/views/header_buttons.rst
Normal 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.
|
Loading…
Reference in New Issue
Block a user