Files
odoo_source/addons/test_mail_sms
Thibault Delavallée 9a5046ba0a [FIX] phone_validation: correctly support phone/mobile search parameters
Currently the search method defined on 'phone_mobile_search' supports either
a boolean (is set / is not set) search, either considers all searches to be
"like TERM". This is coming from the main usage that is the search view
that sends domains like "[('phone_mobile_search', 'ilike', term)]".

In this commit we improve the method to correctly support

  * direct check (=)
  * negative operators (not (i)like)
  * like / ilike (previously like were considered as ilike)

Idea is: a positive operator check that any of the phone fields respects the
domain (phone or mobile is TERM). A negative operator checks that all phone
fields respects the negative domain (both phone and mobile do not contain TERM).

Tests are added.

Task-3012789

X-original-commit: 8e905343f38a4dae828ccaddc62ce5c6a2f754db
Part-of: odoo/odoo#104111
2022-10-26 00:55:05 +02:00
..