diff --git a/addons/crm/crm_data.xml b/addons/crm/crm_data.xml index 3726c744b2e..613141b5818 100644 --- a/addons/crm/crm_data.xml +++ b/addons/crm/crm_data.xml @@ -80,8 +80,7 @@ basis for email recipients, name and to ease the definition of a further elaborated template. --> Opportunity - Send Emails - ${object.user_id.email or ''} - Opportunity ${object.name | h}) + ${object.name} ${object.partner_id.id} diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 93920391ece..2b7d9a7672d 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -930,7 +930,7 @@ class crm_lead(base_stage, format_address, osv.osv): try: compose_form_id = ir_model_data.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')[1] except ValueError: - compose_form_id = False + compose_form_id = False if context is None: context = {} ctx = context.copy() @@ -961,6 +961,15 @@ class crm_lead(base_stage, format_address, osv.osv): return [lead.section_id.message_get_reply_to()[0] if lead.section_id else False for lead in self.browse(cr, uid, ids, context=context)] + def message_get_suggested_recipients(self, cr, uid, ids, context=None): + recipients = super(crm_lead, self).message_get_suggested_recipients(cr, uid, ids, context=context) + for lead in self.browse(cr, uid, ids, context=context): + if lead.partner_id: + self._message_add_suggested_recipient(cr, uid, recipients, lead, partner=lead.partner_id, reason=_('Customer')) + elif lead.email_from: + self._message_add_suggested_recipient(cr, uid, recipients, lead, email=lead.email_from, reason=_('Customer Email')) + return recipients + def message_new(self, cr, uid, msg, custom_values=None, context=None): """ Overrides mail_thread message_new that is called by the mailgateway through message_process. diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 87c130547cd..843c00c4f4d 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -377,7 +377,6 @@ states="draft,open,pending" class="oe_highlight"/>
-
- - Write to the followers of this document... - Share with my followers... -
+ +
+ + Share with my followers... +
+
+ + +
@@ -57,7 +70,7 @@ - File + Attach a File /web/binary/upload_attachment @@ -106,7 +119,7 @@ template to the recipients list --> -
+
To: @@ -129,11 +142,11 @@ <<<
-
- -