diff options
| author | Xavier Morel <xmo@odoo.com> | 2019-06-06 13:46:37 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2019-06-07 08:07:13 +0000 |
| commit | 411abff3880c8b3945e2f3afe963894a2380202d (patch) | |
| tree | 1dbc35d804d2665c506ea84c093ea1142e51c356 /addons/web/static/src/js/views/abstract_controller.js | |
| parent | ace7766971532914234e1cccb2bc7fef9446c14a (diff) | |
[FIX] core: != / not ilike failing to match null records
As odoo makes little difference, one would expect `(field, !=, 'foo')`
or `(field, 'not ilike', 'foo')` to have the same behaviour when field is
empty, and provide the opposite result as the "positive" operators.
However because NULL <OP> <value> returns NULL which is generally
assimilated to false, the sections above would fail to match records
whose field is null (they would match records whose field is *empty*
though).
Fix this by wrapping the operation in a coalesce falling back
to (hopefully) the correct value if the result is null.
See also: odoo/odoo#22879
closes odoo/odoo#33959
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/abstract_controller.js')
0 files changed, 0 insertions, 0 deletions
