[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
This commit is contained in:
Hetal Dhanak
2019-01-25 14:53:56 +00:00
committed by Jorge Pinna Puissant
parent a4a3bfd373
commit 1dbef66b49
2 changed files with 18 additions and 2 deletions
+14
View File
@@ -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
@@ -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")}