diff options
| author | Denis Ledoux <dle@openerp.com> | 2013-12-20 12:52:13 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@openerp.com> | 2013-12-20 12:52:13 +0100 |
| commit | abefabfa3e5f3efa523cc8b55fca9fb934c0891e (patch) | |
| tree | cce9b9f92beda80adceb43f263a188eab263d6a0 | |
| parent | d7b1dafbab95aa6b3ba8dc3fa9d3f7cd588e2ca7 (diff) | |
[FIX] mail: fix _get_default_from if no alias_name for user.
As alias_name is not anymore required, we should check that the alias_domain AND alias_name are set before choosing the alias as email_from of the mail.message
bzr revid: dle@openerp.com-20131220115213-ll8duh01csk0xy4t
| -rw-r--r-- | addons/mail/mail_message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index de8e4c68fda..b29642180e8 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -201,7 +201,7 @@ class mail_message(osv.Model): def _get_default_from(self, cr, uid, context=None): this = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context=context) - if this.alias_domain: + if this.alias_name and this.alias_domain: return '%s <%s@%s>' % (this.name, this.alias_name, this.alias_domain) elif this.email: return '%s <%s>' % (this.name, this.email) |
