diff options
| author | Aaron Bohy <aab@odoo.com> | 2018-05-07 13:44:59 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2018-05-08 15:48:47 +0200 |
| commit | 5bcede7dead1b0f85f318715fb4213b2181b8e46 (patch) | |
| tree | a8d619645bf7c4a125ff07cb2c5eb4abf64ea9f7 /addons/web/static/src/js/chrome/action_manager.js | |
| parent | ccece68ebc78dcaaf1b5d4d02fa9b197bc489539 (diff) | |
[FIX] web: ActionManager: store evaluated context
... in session_storage.
The current action is stored in the session_storage (stringified),
so that it can always be restored on F5 (useful for dynamic
actions). Before this rev., it was stored with it's 'raw' context,
i.e. before its evaluation. However, when this context is an
instance of a CompoundContext, it is meaningless once restored.
So this rev. ensures that the action is stored with its evaluated
context.
Diffstat (limited to 'addons/web/static/src/js/chrome/action_manager.js')
| -rw-r--r-- | addons/web/static/src/js/chrome/action_manager.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/static/src/js/chrome/action_manager.js b/addons/web/static/src/js/chrome/action_manager.js index b36e1b8eec9..c7e9827cdf9 100644 --- a/addons/web/static/src/js/chrome/action_manager.js +++ b/addons/web/static/src/js/chrome/action_manager.js @@ -768,17 +768,17 @@ var ActionManager = Widget.extend({ * @param {Object} options see @doAction options */ _preprocessAction: function (action, options) { - action._originalAction = JSON.stringify(action); - - action.jsID = _.uniqueId('action_'); - action.pushState = options.pushState; - // ensure that the context and domain are evaluated var context = new Context(this.userContext, options.additional_context, action.context); action.context = pyeval.eval('context', context); if (action.domain) { action.domain = pyeval.eval('domain', action.domain, action.context); } + + action._originalAction = JSON.stringify(action); + + action.jsID = _.uniqueId('action_'); + action.pushState = options.pushState; }, /** * Unlinks the given action and its controller from the internal structures |
