summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorPhilémon van Helden <pvh@odoo.com>2021-04-08 09:54:12 +0000
committerNicolas Lempereur <nle@odoo.com>2021-05-03 16:06:05 +0000
commit44b59d10d0ab6440b0a908f518c157a3d670627b (patch)
tree900273f7bfbc4ae388747af7bb138f77a40d219e /addons/web/static/src
parentb55f843e8144f31e11167d95fcb9bff9cfec2536 (diff)
[FIX] web: no error on single active_ids state load
In eg. 13.0 when refreshing sales analysis action of a product, we would get an error because we have a single active_ids which is not expected by the code. With this commit, we use .toString() on the jQuery BBQ parsed active_ids as it was done before 32b8cec5 refactoring (january 2018). The added test with the fix fails with an error: TypeError: state.active_ids.split is not a function at Class.loadState (/web/static/src/js/chrome/action_manager_act_window.js) opw-2471982 closes odoo/odoo#70279 X-original-commit: bf9a985f4b62cc6f1eef4f9fcca2a8dfbd453004 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: pvh-odoo <SwagSamaSempai@users.noreply.github.com> Co-authored-by: Nicolas Lempereur <nle@odoo.com>
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/chrome/action_manager_act_window.js2
1 files changed, 1 insertions, 1 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 ee39d7cb7a7..68a52ea12aa 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
@@ -84,7 +84,7 @@ ActionManager.include({
// jQuery's BBQ plugin does some parsing on values that are valid integers
// which means that if there's only one item, it will do parseInt() on it,
// otherwise it will keep the comma seperated list as string
- context.active_ids = state.active_ids.split(',').map(function (id) {
+ context.active_ids = state.active_ids.toString().split(',').map(function (id) {
return parseInt(id, 10) || id;
});
} else if (state.active_id) {