diff --git a/addons/web/static/src/search/search_model.js b/addons/web/static/src/search/search_model.js index b5b56e37406..21e161c79a1 100644 --- a/addons/web/static/src/search/search_model.js +++ b/addons/web/static/src/search/search_model.js @@ -407,7 +407,7 @@ export class SearchModel extends EventBus { */ get context() { if (!this._context) { - this._context = this._getContext(); + this._context = makeContext([this._getContext(), this.globalContext]); } return deepCopy(this._context); } @@ -1325,7 +1325,7 @@ export class SearchModel extends EventBus { */ _getContext() { const groups = this._getGroups(); - const contexts = [this.userService.context, this.globalContext]; + const contexts = [this.userService.context]; for (const group of groups) { for (const activeItem of group.activeItems) { const context = this._getSearchItemContext(activeItem); diff --git a/addons/web/static/tests/search/custom_favorite_item_tests.js b/addons/web/static/tests/search/custom_favorite_item_tests.js index 9dfa9bfbea1..473655706ad 100644 --- a/addons/web/static/tests/search/custom_favorite_item_tests.js +++ b/addons/web/static/tests/search/custom_favorite_item_tests.js @@ -181,6 +181,7 @@ QUnit.module("Search", (hooks) => { } }, resModel: "foo", + context: { someOtherKey: "bar" }, // should not end up in filter's context Component: TestComponent, searchViewId: false, });