diff options
| -rw-r--r-- | addons/web/static/src/js/views/list/list_model.js | 9 | ||||
| -rw-r--r-- | addons/web/static/src/js/views/list/list_renderer.js | 2 | ||||
| -rw-r--r-- | addons/web/static/tests/views/list_tests.js | 4 | ||||
| -rw-r--r-- | doc/reference/views.rst | 2 |
4 files changed, 5 insertions, 12 deletions
diff --git a/addons/web/static/src/js/views/list/list_model.js b/addons/web/static/src/js/views/list/list_model.js index 41178498c96..6c592bd977e 100644 --- a/addons/web/static/src/js/views/list/list_model.js +++ b/addons/web/static/src/js/views/list/list_model.js @@ -94,14 +94,7 @@ odoo.define('web.ListModel', function (require) { options = options || {}; options.fetchRecordsWithGroups = true; return this._super(list, options).then(function (result) { - var prom; - if (!list.parentID) { - // groupbys buttons are only displayed on the first level of - // groupby so no need to fetch the extra fields for inner - // groups - prom = self._readGroupExtraFields(list); - } - return Promise.resolve(prom).then(_.constant(result)); + return self._readGroupExtraFields(list).then(_.constant(result)); }); }, /** diff --git a/addons/web/static/src/js/views/list/list_renderer.js b/addons/web/static/src/js/views/list/list_renderer.js index 364c663d117..658319fc2e7 100644 --- a/addons/web/static/src/js/views/list/list_renderer.js +++ b/addons/web/static/src/js/views/list/list_renderer.js @@ -579,7 +579,7 @@ var ListRenderer = BasicRenderer.extend({ var $pager = this._renderGroupPager(group); $lastCell.addClass('o_group_pager').append($pager); } - if (groupLevel === 0 && group.isOpen && this.groupbys[groupBy]) { + if (group.isOpen && this.groupbys[groupBy]) { var $buttons = this._renderGroupButtons(group, this.groupbys[groupBy]); if ($buttons.length) { var $buttonSection = $('<div>', { diff --git a/addons/web/static/tests/views/list_tests.js b/addons/web/static/tests/views/list_tests.js index 2c7ce0bacec..aed485aad66 100644 --- a/addons/web/static/tests/views/list_tests.js +++ b/addons/web/static/tests/views/list_tests.js @@ -2039,8 +2039,8 @@ QUnit.module('Views', { await testUtils.dom.click(list.$('tbody:eq(1) .o_group_header:eq(0)')); - assert.containsNone(list, '.o_group_header button', - "there should be no button in the header"); + assert.containsOnce(list, '.o_group_header button', + "there should be one button in the header"); list.destroy(); }); diff --git a/doc/reference/views.rst b/doc/reference/views.rst index 56dca21bf1d..b3504add3c1 100644 --- a/doc/reference/views.rst +++ b/doc/reference/views.rst @@ -345,7 +345,7 @@ Possible children elements of the list view are: ``name`` the name of a many2one field (on the current model). Custom header will be - displayed when grouping the view on this field name (only for first level). + displayed when grouping the view on this field name. .. code-block:: xml |
