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 6d00ac19b51..9911a412a9c 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -917,41 +917,6 @@ class crm_lead(base_stage, format_address, osv.osv): vals['probability'] = stage.probability return super(crm_lead, self).write(cr, uid, ids, vals, context=context) - def new_mail_send(self, cr, uid, ids, context=None): - ''' - This function opens a window to compose an email, with the edi sale template message loaded by default - ''' - assert len(ids) == 1, 'This option should only be used for a single id at a time.' - ir_model_data = self.pool.get('ir.model.data') - try: - template_id = ir_model_data.get_object_reference(cr, uid, 'crm', 'email_template_opportunity_mail')[1] - except ValueError: - template_id = False - 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 - if context is None: - context = {} - ctx = context.copy() - ctx.update({ - 'default_model': 'crm.lead', - 'default_res_id': ids[0], - 'default_use_template': bool(template_id), - 'default_template_id': template_id, - 'default_composition_mode': 'comment', - }) - return { - 'type': 'ir.actions.act_window', - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'mail.compose.message', - 'views': [(compose_form_id, 'form')], - 'view_id': compose_form_id, - 'target': 'new', - 'context': ctx, - } - # ---------------------------------------- # Mail Gateway # ---------------------------------------- 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"/>