From 5664ee04f4acbd55c164330ea2f11b9a2691af3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 2 Feb 2022 08:31:58 +0000 Subject: [PATCH] [IMP] crm: remove outdated fields PURPOSE Improve performance in often used views and fields in a normal Odoo usage. SPECIFICATIONS On crm.lead model * remove field user_email and user_login fields. Those are related non stored and used in kanban for no reason (or even not used). Those can be removed completely; Original commit seems to be odoo/odoo@ea2e8b64c42430b2323149b3b3d6c90f23800c5f which seems to show those fields were added to add a gravtar based on user email, and its login was used to display "responsible". Maybe an internal Odoo related spec, anyway not used anymore. Task-2752043 Part-of: odoo/odoo#83806 --- addons/crm/__manifest__.py | 2 +- addons/crm/models/crm_lead.py | 2 -- addons/crm/views/crm_lead_views.xml | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/crm/__manifest__.py b/addons/crm/__manifest__.py index 23f1c9f7bdc..dffa91da65b 100644 --- a/addons/crm/__manifest__.py +++ b/addons/crm/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'CRM', - 'version': '1.7', + 'version': '1.8', 'category': 'Sales/CRM', 'sequence': 15, 'summary': 'Track leads and close opportunities', diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index e1e17a045c6..c3969410969 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -110,8 +110,6 @@ class Lead(models.Model): user_company_ids = fields.Many2many( 'res.company', compute='_compute_user_company_ids', help='UX: Limit to lead company or all if no company') - user_email = fields.Char('User Email', related='user_id.email', readonly=True) - user_login = fields.Char('User Login', related='user_id.login', readonly=True) team_id = fields.Many2one( 'crm.team', string='Sales Team', check_company=True, index=True, tracking=True, domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", diff --git a/addons/crm/views/crm_lead_views.xml b/addons/crm/views/crm_lead_views.xml index ae766502da2..ace9f61b74f 100644 --- a/addons/crm/views/crm_lead_views.xml +++ b/addons/crm/views/crm_lead_views.xml @@ -531,7 +531,6 @@ -