summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/chrome/action_manager.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-03-21 11:04:48 +0100
committerChristophe Simonis <chs@odoo.com>2018-03-21 11:04:48 +0100
commitb51f2d38c247dce9afc04c29774a77d773e3f393 (patch)
tree1133e0dd4c082543d1f361fb7ec160ac0b2cccc6 /addons/web/static/src/js/chrome/action_manager.js
parentc7dff653d56910fd46e4dcf745c2c6088ce9fc58 (diff)
parent500e3f497057c5d00ae5cc34da7012c6f31f81d4 (diff)
[MERGE] forward port branch saas-11.2 up to 500e3f49705
Diffstat (limited to 'addons/web/static/src/js/chrome/action_manager.js')
-rw-r--r--addons/web/static/src/js/chrome/action_manager.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/addons/web/static/src/js/chrome/action_manager.js b/addons/web/static/src/js/chrome/action_manager.js
index 4cf10b8813a..c4d3f591545 100644
--- a/addons/web/static/src/js/chrome/action_manager.js
+++ b/addons/web/static/src/js/chrome/action_manager.js
@@ -62,7 +62,6 @@ var ActionManager = Widget.extend({
// dialog (i.e. coming from an action with target='new')
this.currentDialogController = null;
},
-
/**
* @override
*/
@@ -140,7 +139,7 @@ var ActionManager = Widget.extend({
* loaded and appended to the DOM ; rejected if the action can't be
* executed (e.g. if doAction has been called to execute another action
* before this one was complete).
- */
+ */
doAction: function (action, options) {
var self = this;
options = _.defaults({}, options, {
@@ -177,6 +176,11 @@ var ActionManager = Widget.extend({
self._preprocessAction(action, options);
return self._handleAction(action, options).then(function () {
+ // now that the action has been executed, force its 'pushState'
+ // flag to 'true', as we don't want to prevent its controller
+ // from pushing its state if it changes in the future
+ action.pushState = true;
+
return action;
});
});
@@ -354,11 +358,6 @@ var ActionManager = Widget.extend({
// toggle the fullscreen mode for actions in target='fullscreen'
self._toggleFullscreen();
- // now that the action has been executed, force its 'pushState'
- // flag to 'true', as we don't want to prevent its controller
- // from pushing its state if it changes in the future
- action.pushState = true;
-
return action;
})
.fail(function () {
@@ -451,6 +450,7 @@ var ActionManager = Widget.extend({
}
var controllerID = _.uniqueId('controller_');
+ options.controllerID = controllerID;
var controller = {
actionID: action.jsID,
jsID: controllerID,
@@ -903,13 +903,13 @@ var ActionManager = Widget.extend({
}
},
/**
- * Intercepts and triggers a redirection on a link
- *
- * @private
- * @param {OdooEvent} ev
- * @param {integer} ev.data.res_id
- * @param {string} ev.data.res_model
- */
+ * Intercepts and triggers a redirection on a link.
+ *
+ * @private
+ * @param {OdooEvent} ev
+ * @param {integer} ev.data.res_id
+ * @param {string} ev.data.res_model
+ */
_onRedirect: function (ev) {
this.do_action({
type:'ir.actions.act_window',