diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2017-01-20 16:24:09 +0100 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2017-01-23 09:19:49 +0100 |
| commit | 68dd9bdb0a5eb2eaff897cb652e701e0ee03bdd1 (patch) | |
| tree | a4fbb5a92487211b5bed61966ce9734da55bd9e2 /addons/board/static/src/js/dashboard.js | |
| parent | 4169049263555ab21ec6203d4d8402e16c7372aa (diff) | |
[FIX] board: prevent crash if no action
If the user tries to save on the dashboard a view which was not open
through an existing action, the call to method `add_to_dashboard`
crashes because of incorrect arguments (`action_id` is undefined in JS).
This is for example the case when trying to save an "Inventory at Date"
in the dashboard (will be fixed in a subsequent commit).
opw-703649
Diffstat (limited to 'addons/board/static/src/js/dashboard.js')
| -rw-r--r-- | addons/board/static/src/js/dashboard.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js index 1d543f1216c..10818ef20a5 100644 --- a/addons/board/static/src/js/dashboard.js +++ b/addons/board/static/src/js/dashboard.js @@ -405,7 +405,7 @@ FavoriteMenu.include({ name = self.$add_dashboard_input.val(); return self.rpc('/board/add_to_dashboard', { - action_id: self.action_id, + action_id: self.action_id || false, context_to_save: c, domain: d, view_mode: self.view_manager.active_view.type, |
