From 748860ca608ce957d8e8ef1d7d86feef47cf6b0f Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Mon, 21 Feb 2011 15:24:01 +0530 Subject: [PATCH] [IMP] emails :- change emails.message.send wizard name to email.compose.message wizard and related changes in some module. bzr revid: ysa@tinyerp.com-20110221095401-pl0pyhzr7h8w7mjl --- addons/crm/crm_lead.py | 32 ------------------- addons/crm/crm_lead_view.xml | 6 ++-- addons/crm/crm_opportunity_view.xml | 4 +-- addons/crm_claim/crm_claim_view.xml | 6 ++-- .../crm_fundraising/crm_fundraising_view.xml | 6 ++-- addons/crm_helpdesk/crm_helpdesk_view.xml | 6 ++-- addons/emails/__openerp__.py | 2 +- addons/emails/email_view.xml | 2 +- addons/emails/wizard/__init__.py | 2 +- ...izard_send.py => email_compose_message.py} | 26 ++++++--------- ...iew.xml => email_compose_message_view.xml} | 12 +++---- addons/event/event_view.xml | 6 ++-- addons/hr_recruitment/hr_recruitment_view.xml | 6 ++-- addons/project_issue/project_issue_view.xml | 6 ++-- 14 files changed, 41 insertions(+), 81 deletions(-) rename addons/emails/wizard/{email_message_wizard_send.py => email_compose_message.py} (88%) rename addons/emails/wizard/{email_message_wizard_send_view.xml => email_compose_message_view.xml} (83%) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index c45a18b7ddc..60e2f447c0d 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -288,38 +288,6 @@ class crm_lead(crm_case, osv.osv): } return value - def action_send_email(self, cr, uid, ids, context=None): - """ - Open Send email wizard. - """ - if context is None: - context = {} - for data in self.browse(cr, uid ,ids, context): - context.update({ - 'mail':'new', - 'default_name': data.name, - 'default_email_to': data.email_from, - 'default_email_from': data.user_id and data.user_id.address_id and data.user_id.address_id.email, - 'default_description': '\n' + (tools.ustr(data.user_id.signature or '')), - 'default_model': context.get('model',''), - 'default_email_cc': tools.ustr(data.email_cc or ''), - 'default_res_id': context.get('rec_id',0) - }) - if hasattr(data, 'section_id'): - context.update({'default_reply_to': data.section_id and data.section_id.reply_to or False}) - - result = { - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'email.message.wizard_send', - 'view_id': False, - 'context': context, - 'type': 'ir.actions.act_window', - 'target': 'new', - 'nodestroy': True - } - return result - def write(self, cr, uid, ids, vals, context=None): if not context: context = {} diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index a7479b8cdef..019e74f19d1 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -170,7 +170,7 @@