From dbca5aa5b5ba1e144c26826f7badb239115d6ee5 Mon Sep 17 00:00:00 2001 From: mcm-odoo Date: Thu, 10 Oct 2019 08:16:16 +0000 Subject: [PATCH] [IMP] crm: make crm.lead phone field editable Before this commit, the user could not edit the lead phone field when a customer was assigned. The phone field was related to the phone of that customer. Now, the field related to the phone of the customer is removed. We can edit the phone field of the lead without modifying the customer one. task-2083470 closes odoo/odoo#38350 Signed-off-by: Thibault Delavallee (tde) --- addons/crm/models/crm_lead.py | 2 -- addons/crm/views/crm_lead_views.xml | 11 ++--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index f573e8dada1..b3536623b31 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -120,9 +120,7 @@ class Lead(models.Model): expected_revenue = fields.Monetary('Prorated Revenue', currency_field='company_currency', store=True, compute="_compute_expected_revenue") date_deadline = fields.Date('Expected Closing', help="Estimate of the date on which the opportunity will be won.") color = fields.Integer('Color Index', default=0) - partner_address_name = fields.Char('Partner Contact Name', related='partner_id.name', readonly=True) partner_address_email = fields.Char('Partner Contact Email', related='partner_id.email', readonly=True) - partner_address_phone = fields.Char('Partner Contact Phone', related='partner_id.phone', readonly=True) partner_is_blacklisted = fields.Boolean('Partner is blacklisted', related='partner_id.is_blacklisted', readonly=True) company_currency = fields.Many2one(string='Currency', related='company_id.currency_id', readonly=True, relation="res.currency") user_email = fields.Char('User Email', related='user_id.email', readonly=True) diff --git a/addons/crm/views/crm_lead_views.xml b/addons/crm/views/crm_lead_views.xml index dbe1249bc99..bee445490cc 100644 --- a/addons/crm/views/crm_lead_views.xml +++ b/addons/crm/views/crm_lead_views.xml @@ -177,16 +177,9 @@ + attrs="{'invisible': [('partner_address_email', '=', False)]}" widget="email" string="Email"/> - - +