diff options
| author | Raphael Collet <rco@odoo.com> | 2019-06-24 14:03:46 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2019-07-04 11:32:22 +0000 |
| commit | 6230f72d2be58069dfd264623944a45c84c99ba4 (patch) | |
| tree | 4d3e919cde4a35809085d4b3a7cfceb8def073cc /addons/mail/wizard/mail_compose_message.py | |
| parent | 3520eee8eb04b18af6c664b550b7d6a887886d99 (diff) | |
[FIX] mail: avoid crashing for users without email address
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 18deb40800b..f5ad45c0a56 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -63,7 +63,7 @@ class MailComposer(models.TransientModel): if 'author_id' not in result: result['author_id'] = self.env.user.partner_id.id if 'email_from' not in result: - result['email_from'] = formataddr((self.env.user.name, self.env.user.email)) + result['email_from'] = formataddr((self.env.user.name, self.env.user.email or "")) else: if 'email_from' not in result: author = self.env['res.partner'].browse(result['author_id']) |
