Commit af73468e authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: improve code to select key and value properly

parent 18d27ab4
......@@ -27,12 +27,20 @@
});
})
.declareMethod('getSearchCriteria', function (a, b) {
var key, value;
if (this.state.extended_search_mapping.hasOwnProperty(b)) {
key = this.state.extended_search_mapping[b].value;
value = a;
} else {
key = this.state.extended_search_mapping[a].key;
value = this.state.extended_search_mapping[a].value;
}
return Query.objectToSearchText(
new SimpleQuery({
operator: "",
key: this.state.extended_search_mapping[b].value,
key: key,
type: "simple",
value: a
value: value
})
);
})
......
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>997.10234.48008.57565</string> </value>
<value> <string>997.10483.47677.43724</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>1640795301.35</float>
<float>1640812793.85</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