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