Commit 883a6391 authored by Gabriel Monnerat's avatar Gabriel Monnerat

fixup! erp5_web_renderjs_ui: fix code to support cases of queries with two parameters

parent a3fc5406
......@@ -27,7 +27,7 @@
});
})
.declareMethod('getSearchCriteria', function (a, b) {
var key, value, query;
var query;
if (this.state.extended_search_mapping.hasOwnProperty(a) &&
this.state.extended_search_mapping.hasOwnProperty(b)) {
query = new ComplexQuery({
......@@ -49,11 +49,19 @@
]
});
} else if (this.state.extended_search_mapping.hasOwnProperty(b)) {
key = this.state.extended_search_mapping[b].value;
value = a;
query = new SimpleQuery({
operator: "",
key: this.state.extended_search_mapping[b].value,
type: "simple",
value: a
});
} else {
key = this.state.extended_search_mapping[a].key;
value = this.state.extended_search_mapping[a].value;
query = new SimpleQuery({
operator: "",
key: this.state.extended_search_mapping[a].key,
type: "simple",
value: this.state.extended_search_mapping[a].value
});
}
return Query.objectToSearchText(query);
})
......
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>997.29983.5320.38758</string> </value>
<value> <string>997.30932.12258.23176</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>1641980191.85</float>
<float>1642037131.72</float>
<string>UTC</string>
</tuple>
</state>
......
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