[IMP] web: add basic search for binary field

With this commit: we are adding basic search feature for binary fields,
custom filter will have binary fields and selecting binary field will
display 'is set', 'is not set' operators.

with this user can at least filter records based on whether binary field
is set or not set.

task-2512226

closes odoo/odoo#70149

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Mohammed Shekha
2021-04-30 09:08:02 +00:00
parent fe022b74a5
commit 28fa5bc806
2 changed files with 50 additions and 0 deletions
@@ -11,6 +11,10 @@ odoo.define('web.searchUtils', function (require) {
// Filter menu parameters
const FIELD_OPERATORS = {
binary: [
{ symbol: "!=", description: _lt("is set"), value: false },
{ symbol: "=", description: _lt("is not set"), value: false },
],
boolean: [
{ symbol: "=", description: _lt("is true"), value: true },
{ symbol: "!=", description: _lt("is false"), value: true },
@@ -66,6 +70,7 @@ odoo.define('web.searchUtils', function (require) {
],
};
const FIELD_TYPES = {
binary: 'binary',
boolean: 'boolean',
char: 'char',
date: 'date',