diff options
| author | Aaron Bohy <aab@odoo.com> | 2018-01-18 11:15:01 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2018-01-19 14:31:05 +0100 |
| commit | a4a54ab8387b68b4477ba3b22bc974ebd349b0d3 (patch) | |
| tree | 10dd644cba62c3459791e647020de802472c3e38 /addons/web/static/src/js | |
| parent | 4681915db229ef8018feec27b729384b650c1727 (diff) | |
[FIX] web: change a param of a client action in the url
Before this rev., an error occurred when the user changed a param
of the url when being in a client action. For instance, open
Discuss, go to 'Starred', then click on the 'Back' arrow of the
browser.
The error occurred because the code made the assumption that the
current action was an ir.actions.act_window.
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/chrome/action_manager_act_window.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/web/static/src/js/chrome/action_manager_act_window.js b/addons/web/static/src/js/chrome/action_manager_act_window.js index a37b37fca73..04322237d7a 100644 --- a/addons/web/static/src/js/chrome/action_manager_act_window.js +++ b/addons/web/static/src/js/chrome/action_manager_act_window.js @@ -45,11 +45,15 @@ ActionManager.include({ */ loadState: function (state) { var action; - var options = {pushState: false}; + var options = { + clear_breadcrumbs: true, + pushState: false, + }; if (state.action) { var currentController = this.getCurrentController(); var currentAction = currentController && this.actions[currentController.actionID]; - if (currentAction && currentAction.id === state.action) { + if (currentAction && currentAction.id === state.action && + currentAction.type === 'ir.actions.act_window') { // the action to load is already the current one, so update it this._closeDialog(true); // there may be a currently opened dialog, close it currentAction.env.currentId = state.id; |
