Thibault Delavallée (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/7.0-fix-notification-email_from-tde into lp:openobject-addons/7.0.
Requested reviews: OpenERP Core Team (openerp) For more details, see: https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-fix-notification-email_from-tde/+merge/145607 [FIX] mail: notification email: email_from is now correctly set (alias of the author if user and alias configured; author email; or email_from of the mail.message). -- https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-fix-notification-email_from-tde/+merge/145607 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/7.0-fix-notification-email_from-tde.
=== modified file 'mail/mail_followers.py' --- mail/mail_followers.py 2013-01-29 16:07:52 +0000 +++ mail/mail_followers.py 2013-01-30 13:52:23 +0000 @@ -126,11 +126,20 @@ if signature: body_html = tools.append_content_to_html(body_html, signature, plaintext=True, container_tag='div') + # email_from: partner-user alias or partner email or mail.message email_from + if msg.author_id and msg.author_id.user_ids and msg.author_id.user_ids[0].alias_domain and msg.author_id.user_ids[0].alias_name: + email_from = '%s <%s@%s>' % (msg.author_id.name, msg.author_id.user_ids[0].alias_name, msg.author_id.user_ids[0].alias_domain) + elif msg.author_id: + email_from = '%s <%s>' % (msg.author_id.name, msg.author_id.email) + else: + email_from = msg.email_from + mail_values = { 'mail_message_id': msg.id, 'email_to': [], 'auto_delete': True, 'body_html': body_html, + 'email_from': email_from, 'state': 'outgoing', } mail_values['email_to'] = ', '.join(mail_values['email_to'])
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : openerp-dev-gtk@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp