[FIX] web: search_filters: need to convert datetime to utc
When a datetime was selected in a search filter, the time wasn't converted to UTC to the server. So, there were unexpecting records due to the wrong query domain. When we retrieve the value from the datepicker, we need to convert it to UTC before sending it to the server.
This commit is contained in:
@@ -187,7 +187,10 @@ ExtendedSearchProposition.DateTime = ExtendedSearchProposition.Field.extend({
|
||||
{value: "∄", text: _lt("is not set")}
|
||||
],
|
||||
get_value: function (index) {
|
||||
return this["datewidget_" + (index || 0)].getValue();
|
||||
// retrieve the datepicker value
|
||||
var value = this["datewidget_" + (index || 0)].getValue();
|
||||
// convert to utc
|
||||
return value.add(-this.getSession().getTZOffset(value), 'minutes');
|
||||
},
|
||||
get_domain: function (field, operator) {
|
||||
switch (operator.value) {
|
||||
|
||||
Reference in New Issue
Block a user