Commit 66f56c0a authored by Georgios Dagkakis's avatar Georgios Dagkakis

erp5_web_renderjs_ui: Relation Field should work if there is no portal_type filtering

parent e284a969
...@@ -315,20 +315,26 @@ ...@@ -315,20 +315,26 @@
return RSVP.delay(200); return RSVP.delay(200);
}) })
.push(function () { .push(function () {
return RSVP.all([ var query_list = [];
if (JSON.parse(gadget.state.portal_types).length > 0) {
gadget.jio_allDocs({ query_list.push(
query: Query.objectToSearchText(new ComplexQuery({
operator: "AND",
query_list: [
QueryFactory.create( QueryFactory.create(
new URI(gadget.state.query).query(true).query new URI(gadget.state.query).query(true).query
), )
);
}
query_list.push(
new SimpleQuery({ new SimpleQuery({
key: gadget.state.catalog_index, key: gadget.state.catalog_index,
value: value_text value: value_text
}) })
] );
return RSVP.all([
gadget.jio_allDocs({
query: Query.objectToSearchText(new ComplexQuery({
operator: "AND",
query_list: query_list
})), })),
limit: [0, 10], limit: [0, 10],
select_list: [gadget.state.catalog_index, "uid"], select_list: [gadget.state.catalog_index, "uid"],
......
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