summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/abstract_controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/views/abstract_controller.js')
-rw-r--r--addons/web/static/src/js/views/abstract_controller.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/addons/web/static/src/js/views/abstract_controller.js b/addons/web/static/src/js/views/abstract_controller.js
index 09451cdcbfa..866abb03d65 100644
--- a/addons/web/static/src/js/views/abstract_controller.js
+++ b/addons/web/static/src/js/views/abstract_controller.js
@@ -228,7 +228,11 @@ var AbstractController = mvc.Controller.extend(ActionMixin, {
this._searchPanel.importState(controllerState.spState);
this.searchPanelDomain = this._searchPanel.getDomain();
} else {
- searchPanelUpdateProm = this._searchPanel.update({searchDomain: this._getSearchDomain()});
+ const viewDomain = await this._getViewDomain();
+ searchPanelUpdateProm = this._searchPanel.update({
+ searchDomain: this.controlPanelDomain,
+ viewDomain,
+ });
postponeRendering = !params.noRender;
params.noRender = true; // wait for searchpanel to be ready to render
}
@@ -299,16 +303,13 @@ var AbstractController = mvc.Controller.extend(ActionMixin, {
return null;
},
/**
- * Return the current search domain. This is the searchDomain used to update
- * the searchpanel. It returns the domain coming from the controlpanel. This
- * function can be overridden to add sub-domains coming from other parts of
- * the interface.
+ * Get the domain defined by the view. It is meant to be overridden.
*
* @private
- * @returns {Array[]}
+ * @returns {Promise<Array[]>}
*/
- _getSearchDomain: function () {
- return this.controlPanelDomain;
+ _getViewDomain: async function () {
+ return [];
},
/**
* Meant to be overriden to return a proper object.