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:
+4
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user