summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Wirtel <stephane@openerp.com>2010-04-27 17:15:05 +0200
committerStephane Wirtel <stephane@openerp.com>2010-04-27 17:15:05 +0200
commit170bc320cc2ff1a86628679cd4a7c8ce38b047c4 (patch)
treee548671e5d4611a3e2e3fab0347f097523b8be0b
parent45800149edc2d976f2aab7871bdc74582acb5a84 (diff)
[FIX] crm: Show the Name of the User in the 'from' field in the send email wizard
bzr revid: stephane@openerp.com-20100427151505-4xtc16w4zkz4wszi
-rw-r--r--addons/crm/wizard/crm_send_email.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py
index 5658d3ee577..78bf362af45 100644
--- a/addons/crm/wizard/crm_send_email.py
+++ b/addons/crm/wizard/crm_send_email.py
@@ -162,7 +162,9 @@ class crm_send_new_email(osv.osv_memory):
if 'email_from' in fields:
res.update({'email_from': (case.section_id and case.section_id.reply_to) or \
(case.user_id and case.user_id.address_id and \
- case.user_id.address_id.email) or tools.config.get('email_from',False)})
+ case.user_id.address_id.email and \
+ "%s <%s>" % (case.user_id.name, case.user_id.address_id.email)) or \
+ tools.config.get('email_from',False)})
if 'subject' in fields:
res.update({'subject': '[%s] %s' %(str(case.id), case.name or '')})
if 'email_cc' in fields: