From 050dea5813e6cf4f7d55c0953f427bda358c44d1 Mon Sep 17 00:00:00 2001 From: "Louis Wicket (wil)" Date: Thu, 19 May 2022 12:52:48 +0000 Subject: [PATCH] [IMP] base: set phone and mobile fields to unaccent=False Set `phone` and `mobile` fields on `res.partner` to unaccent=False since phone numbers are unlikely to have any accent. This will also make it easier to add indexes on these fields in the future. Part of task-2832241 closes odoo/odoo#91788 Signed-off-by: Xavier Morel (xmo) --- odoo/addons/base/models/res_partner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odoo/addons/base/models/res_partner.py b/odoo/addons/base/models/res_partner.py index 54bb10d51ac..d8368a63788 100644 --- a/odoo/addons/base/models/res_partner.py +++ b/odoo/addons/base/models/res_partner.py @@ -200,8 +200,8 @@ class Partner(models.Model): email_formatted = fields.Char( 'Formatted Email', compute='_compute_email_formatted', help='Format email address "Name "') - phone = fields.Char() - mobile = fields.Char() + phone = fields.Char(unaccent=False) + mobile = fields.Char(unaccent=False) is_company = fields.Boolean(string='Is a Company', default=False, help="Check if the contact is a company, otherwise it is a person") is_public = fields.Boolean(compute='_compute_is_public')