diff options
| author | Mathieu Duckerts-Antoine <dam@odoo.com> | 2019-03-28 10:40:44 +0000 |
|---|---|---|
| committer | Mathieu Duckerts-Antoine <dam@odoo.com> | 2019-03-28 12:47:01 +0000 |
| commit | 98e4540fe9adab8bd0d77fbff7906a5b7fbd01a3 (patch) | |
| tree | 70b2c0c0a7dd3ed235f0961df9ecd78025c1dc5e /addons/web/static | |
| parent | 85b595e6f0c954b27c9546c77198850b4bd15fcd (diff) | |
[FIX] web: call super in AbstractAction willStart
The commit https://github.com/odoo/enterprise/commit/19a144d6af2974e964c6487170e6bca1b14d3898 has
modified how libraries are loaded at several places and has
introduced a bug in sale_subscription_dashboard where the
libraries are no longer loaded at all. We fix that situation
by calling super in the willStart method of AbstractAction
that inherits from Widget. Abstract actions can now also
benefit from the mechanism present in Widget willStart.
closes odoo/odoo#32209
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Diffstat (limited to 'addons/web/static')
| -rw-r--r-- | addons/web/static/src/js/chrome/abstract_action.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_action.js b/addons/web/static/src/js/chrome/abstract_action.js index a5f98434ddb..c40f831e98e 100644 --- a/addons/web/static/src/js/chrome/abstract_action.js +++ b/addons/web/static/src/js/chrome/abstract_action.js @@ -91,20 +91,20 @@ var AbstractAction = Widget.extend(ActionMixin, { */ willStart: function () { var self = this; + var defs = [this._super.apply(this, arguments)]; if (this.hasControlPanel) { var params = this.controlPanelParams; - var def; if (this.loadControlPanel) { - def = this + defs.push(this .loadFieldView(params.modelName, params.context || {}, params.viewId, 'search') .then(function (fieldsView) { params.viewInfo = { arch: fieldsView.arch, fields: fieldsView.fields, }; - }); + })); } - return $.when(def).then(function () { + return $.when.apply(this, defs).then(function () { var controlPanelView = new self.config.ControlPanelView(params); return controlPanelView.getController(self).then(function (controlPanel) { self._controlPanel = controlPanel; @@ -112,7 +112,7 @@ var AbstractAction = Widget.extend(ActionMixin, { }); }); } - return $.when(); + return $.when.apply(this, defs); }, /** * @override |
