Commit a3fe54a4 authored by Sven Franck's avatar Sven Franck

app: switch to the correct view now that no hardcoded values are available

parent 228a98ef
......@@ -6181,15 +6181,20 @@
method = factory.widget[type] || undefined;
promise_list = [];
// set results, here, so dynamic kids are correct!
if (pass.grant && reply.response) {
pointer_results = util.parse(reply.response);
// NOTE:
// set results here, so kids.length is available in wrapper generation.
// Also, if dynamic and no response (eg for "new" record, we set an empty
// placeholder here which will generate an empty form
if (!pass.skip) {
pointer_results = util.parse(reply.response) ||
{"data": {"total_rows": 0, "rows": []}};
data_total_rows = pointer_results.data.total_rows;
}
// kids (must be declared before wrapper, because some wrapper need length
if (pass.content_dict.view_dict) {
kids = pass.content_dict.view_dict[pass.url_dict.mode || "default"];
kids = pass.content_dict.view_dict[pass.url_dict.mode] ||
pass.content_dict.view_dict["default"];
} else {
kids = pass.content_dict.children || pass.config_dict.children || [];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment