From bb6d80e4f647facecc7b7f2fc23c728d09e0c247 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Fri, 12 Aug 2016 13:23:28 +0200 Subject: [PATCH] Manage list values of res_id The res_id value returned from an action on the server can be a list or a number, so it must be converted to a list only when it is not a already. issue5774 review32411002 --- src/tab.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tab.js b/src/tab.js index 4613b861f5..1e3e9af11e 100644 --- a/src/tab.js +++ b/src/tab.js @@ -291,7 +291,10 @@ this.set_name(attributes.name || ''); this.el.append(screen.screen_container.el); if (attributes.res_id) { - screen.group.load([attributes.res_id]); + if (!jQuery.isArray(attributes.res_id)) { + attributes.res_id = [attributes.res_id]; + } + screen.group.load(attributes.res_id); screen.set_current_record( screen.group.get(attributes.res_id)); screen.display();