diff options
Diffstat (limited to 'addons/crm/models/crm_lead.py')
| -rw-r--r-- | addons/crm/models/crm_lead.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index 37cdf2a0cb7..03127b46899 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -493,7 +493,8 @@ class Lead(models.Model): # searching on +32485112233 should also finds 00485112233 (00 / + prefix are both valid) # we therefore remove it from input value and search for both of them in db if value.startswith('+') or value.startswith('00'): - value = value.replace('+', '').replace('00', '', 1) + if value.startswith('00'): + value = value[2:] starts_with = '00|\+' else: starts_with = '%' |
