diff --git a/addons/web/static/src/js/views/pivot/pivot_model.js b/addons/web/static/src/js/views/pivot/pivot_model.js
index b60cf81ac86..2c41200ec0f 100644
--- a/addons/web/static/src/js/views/pivot/pivot_model.js
+++ b/addons/web/static/src/js/views/pivot/pivot_model.js
@@ -422,6 +422,7 @@ var PivotModel = AbstractModel.extend({
}
if ('domain' in params) {
this.data.domain = params.domain;
+ this.initialDomain = params.domain;
} else {
this.data.domain = this.initialDomain;
}
diff --git a/addons/web/static/tests/views/pivot_tests.js b/addons/web/static/tests/views/pivot_tests.js
index 2fca169e591..ed47c253cfa 100644
--- a/addons/web/static/tests/views/pivot_tests.js
+++ b/addons/web/static/tests/views/pivot_tests.js
@@ -4,6 +4,7 @@ odoo.define('web.pivot_tests', function (require) {
var core = require('web.core');
var PivotView = require('web.PivotView');
var testUtils = require('web.test_utils');
+var testUtilsDom = require('web.test_utils_dom');
var createActionManager = testUtils.createActionManager;
var patchDate = testUtils.mock.patchDate;
@@ -16,7 +17,7 @@ QUnit.module('Views', {
this.data = {
partner: {
fields: {
- foo: {string: "Foo", type: "integer"},
+ foo: {string: "Foo", type: "integer", searchable: true},
bar: {string: "bar", type: "boolean"},
date: {string: "Date", type: "date", store: true, sortable: true},
product_id: {string: "Product", type: "many2one", relation: 'product', store: true},
@@ -1841,6 +1842,71 @@ QUnit.module('Views', {
actionManager.destroy();
});
+ QUnit.test('Navigation list view for a group and back with breadcrumbs', function (assert) {
+ assert.expect(16);
+ // create an action manager to test the interactions with the search view
+ var readGroupCount = 0;
+ var actionManager = createActionManager({
+ data: this.data,
+ archs: {
+ 'partner,false,pivot': '