diff --git a/addons/crm_fundraising/crm_fundraising.py b/addons/crm_fundraising/crm_fundraising.py
index ad14cecb1f6..89881b21d98 100644
--- a/addons/crm_fundraising/crm_fundraising.py
+++ b/addons/crm_fundraising/crm_fundraising.py
@@ -21,6 +21,7 @@
from osv import fields, osv
from crm import crm
+import tools
class crm_fundraising(crm.crm_case, osv.osv):
""" Fund Raising Cases """
@@ -93,6 +94,37 @@ class crm_fundraising(crm.crm_case, osv.osv):
'planned_revenue': lambda *a:0.0,
}
+ def action_send_email(self, cr, uid, ids, context=None):
+ """
+ Open Send email wizard.
+ """
+ if context is None:
+ context = {}
+ for lead in self.browse(cr, uid ,ids, context):
+ context.update({
+ 'mail':'new',
+ 'model': 'crm.lead',
+ 'default_name': lead.name,
+ 'default_email_to': lead.email_from,
+ 'default_email_from': lead.user_id and lead.user_id.address_id and lead.user_id.address_id.email,
+ 'default_description': '\n' + (tools.ustr(lead.user_id.signature or '')),
+ 'default_reply_to': lead.section_id and lead.section_id.reply_to or False,
+ 'default_model': context.get('model',''),
+ 'default_email_cc': tools.ustr(lead.email_cc or ''),
+ 'default_res_id': context.get('rec_id',0)
+ })
+ 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
+
crm_fundraising()
diff --git a/addons/crm_fundraising/crm_fundraising_view.xml b/addons/crm_fundraising/crm_fundraising_view.xml
index 8c704347c67..fde8905f5b3 100644
--- a/addons/crm_fundraising/crm_fundraising_view.xml
+++ b/addons/crm_fundraising/crm_fundraising_view.xml
@@ -33,7 +33,7 @@
{'type':'fundraising'}
Create and manage fund raising activity categories you want to be maintained in the system.
-
+