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
This commit is contained in:
Sergi Almacellas Abellana
2016-08-12 13:23:28 +02:00
parent 56e3197283
commit bb6d80e4f6
+4 -1
View File
@@ -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();