From 1dbef66b49d8754c5d874420344e72add3485d4c Mon Sep 17 00:00:00 2001 From: Hetal Dhanak Date: Thu, 10 Jan 2019 07:26:26 +0000 Subject: [PATCH] [FIX] web: date filter operators less than greater than Before this commit, in the filter, when using a custom filter with a date field, the operators "is after" and "is before" were set to execute "is after or equal" and "if before or equal" respectively. That means it includes in the results, records with the same date as the filter. Now, the operators 'is after' and 'is before' won't include the records with the same date as the filter. And the operators 'is after or equal' and 'is before or equal' will include the records with the same date as the filter. Fixes #29868 OPW-1921756 closes odoo/odoo#30560 --- addons/web/i18n/web.pot | 14 ++++++++++++++ addons/web/static/src/js/chrome/search_filters.js | 6 ++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/addons/web/i18n/web.pot b/addons/web/i18n/web.pot index f040ef6f47e..da5b39437f6 100644 --- a/addons/web/i18n/web.pot +++ b/addons/web/i18n/web.pot @@ -3003,6 +3003,13 @@ msgstr "" msgid "is after" msgstr "" +#. module: web +#. openerp-web +#: code:addons/web/static/src/js/chrome/search_filters.js:185 +#, python-format +msgid "is after or equal" +msgstr "" + #. module: web #. openerp-web #: code:addons/web/static/src/js/chrome/search_filters.js:184 @@ -3010,6 +3017,13 @@ msgstr "" msgid "is before" msgstr "" +#. module: web +#. openerp-web +#: code:addons/web/static/src/js/chrome/search_filters.js:186 +#, python-format +msgid "is before or equal" +msgstr "" + #. module: web #. openerp-web #: code:addons/web/static/src/js/chrome/search_filters.js:185 diff --git a/addons/web/static/src/js/chrome/search_filters.js b/addons/web/static/src/js/chrome/search_filters.js index 582af7e70ef..4628578f9fe 100644 --- a/addons/web/static/src/js/chrome/search_filters.js +++ b/addons/web/static/src/js/chrome/search_filters.js @@ -180,8 +180,10 @@ var DateTime = Field.extend({ operators: [ {value: "=", text: _lt("is equal to")}, {value: "!=", text: _lt("is not equal to")}, - {value: ">=", text: _lt("is after")}, - {value: "<=", text: _lt("is before")}, + {value: ">", text: _lt("is after")}, + {value: "<", text: _lt("is before")}, + {value: ">=", text: _lt("is after or equal")}, + {value: "<=", text: _lt("is before or equal")}, {value: "between", text: _lt("is between")}, {value: "∃", text: _lt("is set")}, {value: "∄", text: _lt("is not set")}