summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorVandan Shah <vas@odoo.com>2018-10-25 06:53:00 +0000
committerAaron Bohy <aab@odoo.com>2019-04-23 13:45:15 +0000
commit9b90d8727da9df6eb7ce756c4f9ffb0973e6ea65 (patch)
tree0617989834e0d6915314b39d1c07d5b50690b1b2 /doc/reference
parent8c931ffc2e6f31caac4c15050403a84ca92b8c82 (diff)
[IMP] web: enable drag&drop in ungrouped kanban views
With this rev., the resequencing feature (with drag and drop) that was already available in list views is now available also in kanban views having a field with widget="handle". This works for main as well as x2many kanban views. Some code handling the resequencing has been moved from the list components (controller and renderer) to the basic ones, so that the logic is shared between list and kanban. Task 1902808 closes odoo/odoo#28581 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com> Co-authored-by: Mohammed Shekha <msh@openerp.com> Co-authored-by: Aaron Bohy <aab@odoo.com>
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/javascript_reference.rst5
-rw-r--r--doc/reference/views.rst20
2 files changed, 15 insertions, 10 deletions
diff --git a/doc/reference/javascript_reference.rst b/doc/reference/javascript_reference.rst
index 05e546dfec6..0e6d2578bad 100644
--- a/doc/reference/javascript_reference.rst
+++ b/doc/reference/javascript_reference.rst
@@ -1673,9 +1673,10 @@ order.
- handle (HandleWidget)
- This field's job is to be displayed as a *handle* in a list view, and allows
- reordering the various records by drag and dropping lines.
+ This field's job is to be displayed as a *handle*, and allows reordering the
+ various records by drag and dropping them.
+ .. warning:: It has to be specified on the field by which records are sorted.
.. warning:: Having more than one field with a handle widget on the same list is not supported.
- Supported field types: *integer*
diff --git a/doc/reference/views.rst b/doc/reference/views.rst
index 56dca21bf1d..767bb8bbe5b 100644
--- a/doc/reference/views.rst
+++ b/doc/reference/views.rst
@@ -309,16 +309,14 @@ Possible children elements of the list view are:
lists the groups which should be able to see the field
``widget``
alternate representations for a field's display. Possible list view
- values are:
+ values are (among others):
``progressbar``
displays ``float`` fields as a progress bar.
- ``many2onebutton``
- replaces the m2o field's value by a checkmark if the field is
- filled, and a cross if it is not
``handle``
- for ``sequence`` fields, instead of displaying the field's value
- just displays a drag&drop icon
+ for ``sequence`` (or ``integer``) fields by which records are
+ sorted, instead of displaying the field's value just displays a
+ drag&drop icon to reorder records.
``sum``, ``avg``
displays the corresponding aggregate at the bottom of the column. The
aggregation is only computed on *currently displayed* records. The
@@ -1101,8 +1099,14 @@ Possible children of the view element are:
While most of the Kanban templates are standard :ref:`reference/qweb`, the
Kanban view processes ``field``, ``button`` and ``a`` elements specially:
- * by default fields are replaced by their formatted value, unless they
- match specific kanban view widgets
+ * by default fields are replaced by their formatted value, unless the
+ ``widget`` attribute is specified, in which case their rendering and
+ behavior depends on the corresponding widget. Possible values are (among
+ others):
+
+ ``handle``
+ for ``sequence`` (or ``integer``) fields by which records are
+ sorted, allows to drag&drop records to reorder them.
.. todo:: list widgets?