diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2019-10-29 08:37:01 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-29 15:16:17 +0000 |
| commit | 0562940f2c0cfb5483ba1043fffc86988d97445a (patch) | |
| tree | c42160ae000457c51d3b6f168479bc7ea4c52ccf /addons/web/static/src/js/views/abstract_controller.js | |
| parent | 72fa7d7015dadb44e14c60f0ef08cf45654c1ddf (diff) | |
[FIX] mail: dicuss can save favorite filters
In discuss, make a search with some stuff, and try to save
that filter as favorite
Before this commit, there was a crash, because the Discuss action
did not implement what the controllers do to save favorites.
After this commit, it is possible to save a filter as favorite
OPW 2087258
closes odoo/odoo#39519
X-original-commit: 5514a414324675bf5c2cc0360e429a7d2548b16f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/abstract_controller.js')
| -rw-r--r-- | addons/web/static/src/js/views/abstract_controller.js | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/addons/web/static/src/js/views/abstract_controller.js b/addons/web/static/src/js/views/abstract_controller.js index 43a485fb009..780b0bcf1b6 100644 --- a/addons/web/static/src/js/views/abstract_controller.js +++ b/addons/web/static/src/js/views/abstract_controller.js @@ -24,14 +24,13 @@ var session = require('web.session'); var QWeb = core.qweb; var AbstractController = mvc.Controller.extend(ActionMixin, { - custom_events: { - get_controller_query_params: '_onGetControllerQueryParams', + custom_events: _.extend({}, ActionMixin.custom_events, { navigation_move: '_onNavigationMove', open_record: '_onOpenRecord', search: '_onSearch', switch_view: '_onSwitchView', search_panel_domain_updated: '_onSearchPanelDomainUpdated', - }, + }), events: { 'click a[type="action"]': '_onActionClicked', }, @@ -547,21 +546,6 @@ var AbstractController = mvc.Controller.extend(ActionMixin, { } }, /** - * FIXME: this logic should be rethought - * - * Handles a context request: provides to the caller the state of the - * current controller. - * - * @private - * @param {OdooEvent} ev - * @param {function} ev.data.callback used to send the requested state - */ - _onGetControllerQueryParams: function (ev) { - ev.stopPropagation(); - var state = this.getOwnedQueryParams(); - ev.data.callback(state || {}); - }, - /** * Called either from the control panel to focus the controller * or from the view to focus the search bar * |
