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 () {
var query_list = [];
if (JSON.parse(gadget.state.portal_types).length > 0) {
query_list.push(
QueryFactory.create(
new URI(gadget.state.query).query(true).query
)
);
}
query_list.push(
new SimpleQuery({
key: gadget.state.catalog_index,
value: value_text
})
);
return RSVP.all([ return RSVP.all([
gadget.jio_allDocs({ gadget.jio_allDocs({
query: Query.objectToSearchText(new ComplexQuery({ query: Query.objectToSearchText(new ComplexQuery({
operator: "AND", operator: "AND",
query_list: [ query_list: query_list
QueryFactory.create(
new URI(gadget.state.query).query(true).query
),
new SimpleQuery({
key: gadget.state.catalog_index,
value: value_text
})
]
})), })),
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