Skip to content
Snippets Groups Projects
Commit bb775152 authored by Lucas Perais (lpe)'s avatar Lucas Perais (lpe)
Browse files

[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#38898

Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
parent 1f1fa173
No related branches found
No related tags found
No related merge requests found
......@@ -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});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment