diff --git a/addons/crm/data/digest_data.xml b/addons/crm/data/digest_data.xml index 9da9d78e512..d044815d18e 100644 --- a/addons/crm/data/digest_data.xml +++ b/addons/crm/data/digest_data.xml @@ -16,9 +16,9 @@

Tip: Convert incoming emails into opportunities

- -

Did you know emails sent to generate opportunities in your pipeline?
- Try sending an email to your CRM. This email address is configurable by sales team members.

+ +

Did you know emails sent to generate opportunities in your pipeline?
+ Try sending an email to your CRM. This email address is configurable by sales team members.

Did you know emails sent to a Sales Team alias generate opportunities in your pipeline?

diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index 1bcea9ed084..d8c789384e1 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -1276,10 +1276,9 @@ class Lead(models.Model): ('alias_force_thread_id', '=', False) ], limit=1) - if alias_record and alias_record.alias_domain and alias_record.alias_name: - email = f'{alias_record.alias_name}@{alias_record.alias_domain}' + if alias_record.alias_domain and alias_record.alias_name: sub_title = Markup(_('Use the New button, or send an email to %(email_link)s to test the email gateway.')) % { - 'email_link': Markup("%s") % (email, email), + 'email_link': Markup("%s") % (alias_record.display_name, alias_record.display_name), } return super().get_empty_list_help( f'

{help_title}

{sub_title}

' diff --git a/addons/crm/models/crm_team.py b/addons/crm/models/crm_team.py index 4ada6a3b3b2..40ccee93b3d 100644 --- a/addons/crm/models/crm_team.py +++ b/addons/crm/models/crm_team.py @@ -24,9 +24,7 @@ class Team(models.Model): use_leads = fields.Boolean('Leads', help="Check this box to filter and qualify incoming requests as leads before converting them into opportunities and assigning them to a salesperson.") use_opportunities = fields.Boolean('Pipeline', default=True, help="Check this box to manage a presales process with opportunities.") - alias_id = fields.Many2one( - 'mail.alias', string='Alias', ondelete="restrict", required=True, - help="The email address associated with this channel. New emails received will automatically create new leads assigned to the channel.") + alias_id = fields.Many2one(help="The email address associated with this channel. New emails received will automatically create new leads assigned to the channel.") # assignment assignment_enabled = fields.Boolean('Lead Assign', compute='_compute_assignment_enabled') assignment_auto_enabled = fields.Boolean('Auto Assignment', compute='_compute_assignment_enabled') diff --git a/addons/crm/tests/test_crm_lead.py b/addons/crm/tests/test_crm_lead.py index 0b5e33f0492..8cf4b4a20f3 100644 --- a/addons/crm/tests/test_crm_lead.py +++ b/addons/crm/tests/test_crm_lead.py @@ -627,7 +627,7 @@ class TestCRMLead(TestCrmCommon): new_lead = self.format_and_process( INCOMING_EMAIL, 'unknown.sender@test.example.com', - '%s@%s' % (self.sales_team_1.alias_name, self.alias_domain), + self.sales_team_1.alias_email, subject='Delivery cost inquiry', target_model='crm.lead', ) diff --git a/addons/crm/tests/test_crm_lead_multicompany.py b/addons/crm/tests/test_crm_lead_multicompany.py index 7b6118d5b3a..ff1d57f9544 100644 --- a/addons/crm/tests/test_crm_lead_multicompany.py +++ b/addons/crm/tests/test_crm_lead_multicompany.py @@ -314,7 +314,7 @@ class TestCRMLeadMultiCompany(TestCrmCommon): new_lead = self.format_and_process( INCOMING_EMAIL, customer_company.email, - '%s@%s' % (self.sales_team_1.alias_name, self.alias_domain), + self.sales_team_1.alias_email, subject='Team having partner in company', target_model='crm.lead', ) diff --git a/addons/crm/views/crm_helper_templates.xml b/addons/crm/views/crm_helper_templates.xml index f3610e25e58..6cd44f01253 100644 --- a/addons/crm/views/crm_helper_templates.xml +++ b/addons/crm/views/crm_helper_templates.xml @@ -1,11 +1,11 @@