[FIX] web: custom filter on date[time] with changing the operator
On a list view, Add a custom filter on a date Change the operator to "in between" Change it back to "equal" Apply the search Before this commit, the label of the filter still was in between Whereas it should have been "equal to ..." After this commit, the label of the filter is correct OPW 2085951 closes odoo/odoo#38705 closes odoo/odoo#38869 closes odoo/odoo#38936 Original-signed-off-by: Lucas Perais (lpe) <lpe@odoo.com> Original-signed-off-by: Lucas Perais (lpe) <lpe@odoo.com> X-original-commit: bb775152b79f1212258ff47daac387eaf11f64e2 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This commit is contained in:
committed by
fw-bot
parent
a4910628b3
commit
1f6a7debf2
@@ -237,7 +237,8 @@ var DateTime = Field.extend({
|
||||
},
|
||||
toString: function () {
|
||||
var str = field_utils.format[this.attributes.type](this.get_value(), {type: this.attributes.type});
|
||||
var date_1_value = this.datewidget_1 && this.get_value(1);
|
||||
// the second datewidget might have been hidden because the operator has changed
|
||||
var date_1_value = this.datewidget_1 && !this.datewidget_1.$el.hasClass('o_hidden') && this.get_value(1);
|
||||
if (date_1_value) {
|
||||
str += _lt(" and ") + field_utils.format[this.attributes.type](date_1_value, {type: this.attributes.type});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user