summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorMathieu Duckerts-Antoine <dam@odoo.com>2019-03-28 12:54:11 +0000
committerMathieu Duckerts-Antoine <dam@odoo.com>2019-04-01 14:40:51 +0000
commitd23419fd86d5f8266c37526176c1bf79a09a1684 (patch)
tree668aa3768d1ec57d3af8780b2dfcfb1480211e5e /addons/web/static/src
parent4315e1b4aad336ae00163caa7b273959f2960d1d (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.
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/chrome/abstract_action.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_action.js b/addons/web/static/src/js/chrome/abstract_action.js
index cf85a278884..e28fd896182 100644
--- a/addons/web/static/src/js/chrome/abstract_action.js
+++ b/addons/web/static/src/js/chrome/abstract_action.js
@@ -91,11 +91,11 @@ var AbstractAction = Widget.extend(ActionMixin, {
*/
willStart: function () {
var self = this;
- var defs = [this._super.apply(this, arguments)];
+ var proms = [this._super.apply(this, arguments)];
if (this.hasControlPanel) {
var params = this.controlPanelParams;
if (this.loadControlPanel) {
- defs.push(this
+ proms.push(this
.loadFieldView(params.modelName, params.context || {}, params.viewId, 'search')
.then(function (fieldsView) {
params.viewInfo = {
@@ -104,7 +104,7 @@ var AbstractAction = Widget.extend(ActionMixin, {
};
}));
}
- return Promise.all(defs).then(function () {
+ return Promise.all(proms).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 Promise.all(defs);
+ return Promise.all(proms);
},
/**
* @override