From c76345999c392eb4a17c644b2faf7f312bc06494 Mon Sep 17 00:00:00 2001
From: Yenthe666 <yenthevg@gmail.com>
Date: Tue, 21 Jan 2020 09:59:46 +0000
Subject: [PATCH] [FIX] base: search on partial mobile phone numbers too

Before this commit the search would search for phone numbers that contained a part of a string. The mobile phone would only look at exact matches so if we'd search for '0492700' the only result would be contacts with this exact match. After this commit every mobile phone that contains '0492700' will match and be shown. This allows for quickly finding customers by a partial mobile, just like the phone number does.

closes odoo/odoo#43752

X-original-commit: 8a34a6a66f3f06829231e5d0ba536fcdd27d17ea
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
---
 odoo/addons/base/views/res_partner_views.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/odoo/addons/base/views/res_partner_views.xml b/odoo/addons/base/views/res_partner_views.xml
index cbb68cfe01ef..cb3624983bf1 100644
--- a/odoo/addons/base/views/res_partner_views.xml
+++ b/odoo/addons/base/views/res_partner_views.xml
@@ -468,7 +468,7 @@
                         filter_domain="['|', '|', ('display_name', 'ilike', self), ('ref', '=', self), ('email', 'ilike', self)]"/>
                     <field name="parent_id" domain="[('is_company', '=', True)]" operator="child_of"/>
                     <field name="email" filter_domain="[('email', 'ilike', self)]"/>
-                    <field name="phone" filter_domain="['|', ('phone', 'ilike', self), ('mobile', '=', self)]"/>
+                    <field name="phone" filter_domain="['|', ('phone', 'ilike', self), ('mobile', 'ilike', self)]"/>
                     <field name="category_id" string="Tag" filter_domain="[('category_id', 'child_of', self)]"/>
                     <field name="user_id"/>
                     <separator/>
-- 
GitLab