[FIX]: crm: Send email wizard crashes on client when there is no section id
authorrpa (Open ERP) <rpa@tinyerp.com>
Tue, 27 Jul 2010 13:44:48 +0000 (19:14 +0530)
committerrpa (Open ERP) <rpa@tinyerp.com>
Tue, 27 Jul 2010 13:44:48 +0000 (19:14 +0530)
bzr revid: rpa@tinyerp.com-20100727134448-xwfgan5uir1tw20n

addons/crm/wizard/crm_send_email.py

index 923c32f..aed957c 100644 (file)
@@ -177,7 +177,7 @@ class crm_send_new_email(osv.osv_memory):
             if 'email_from' in fields:
                 res.update({'email_from': user_mail_from and tools.ustr(user_mail_from) or ''})
             if 'reply_to' in fields:
-                res.update({'reply_to': case.section_id.reply_to})
+                res.update({'reply_to': case.section_id and case.section_id.reply_to or False})
             if 'subject' in fields:
                 res.update({'subject': tools.ustr(context.get('subject', case.name) or '')})
             if 'email_cc' in fields: