diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2019-10-16 09:20:15 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-17 10:50:03 +0000 |
| commit | 1f6a7debf2bf90fc293c7589cf52f08d42cf6249 (patch) | |
| tree | 20eba579b9cbc92923375ce06ac13ab5daa138fd /addons/web/static/src/js | |
| parent | a4910628b31ae73960815a4007e52c369e0185a5 (diff) | |
[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>
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/control_panel/search/search_filters.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/control_panel/search/search_filters.js b/addons/web/static/src/js/views/control_panel/search/search_filters.js index 759626bc1bb..f6b4bc13f6b 100644 --- a/addons/web/static/src/js/views/control_panel/search/search_filters.js +++ b/addons/web/static/src/js/views/control_panel/search/search_filters.js @@ -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}); } |
