summaryrefslogtreecommitdiff
path: root/addons/mail/wizard/invite.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2014-08-05 12:54:03 +0200
committerThibault Delavallée <tde@openerp.com>2014-08-11 15:39:26 +0200
commitc64b07736204c0f9f575ee167879ccbdf4603645 (patch)
tree4c76ac461c017eb8050deafb43bfac3754d09135 /addons/mail/wizard/invite.py
parent9b0cac0aa0f5250b1eec5a11a46a02483c29b5ff (diff)
[FIX] mail: fixed bounce email recognition + invite email headers + mass mailing statistics not lost anymore
- [FIX] bounce regex: too many emails were considered as bounce and therefore not displayed in the chatter and lost for the communication history. The regex was not correctly looking for the bounce alias in the email_to. - [FIX] invite email: replying to the invitation email (invitation as new follower) now replies to the user sending the invitation. - [FIX] mass_mailing: added a column to store the id of the original email in addition to the many2one column. The many2one is set to null when deleting the original email. As the information is necessary, it is saved on another field. The many2one is necessary for indexes purpose as the inverse of a one2many.
Diffstat (limited to 'addons/mail/wizard/invite.py')
-rw-r--r--addons/mail/wizard/invite.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/addons/mail/wizard/invite.py b/addons/mail/wizard/invite.py
index 457eabb319c..9399e4f943f 100644
--- a/addons/mail/wizard/invite.py
+++ b/addons/mail/wizard/invite.py
@@ -60,9 +60,9 @@ class invite_wizard(osv.osv_memory):
help="If checked, the partners will receive an email warning they have been "
"added in the document's followers."),
}
-
+
_defaults = {
- 'send_mail' : True,
+ 'send_mail': True,
}
def add_followers(self, cr, uid, ids, context=None):
@@ -91,10 +91,13 @@ class invite_wizard(osv.osv_memory):
mail_id = mail_mail.create(cr, uid, {
'model': wizard.res_model,
'res_id': wizard.res_id,
+ 'email_from': self.pool['mail.message']._get_default_from(cr, uid, context=context),
+ 'reply_to': self.pool['mail.message']._get_default_from(cr, uid, context=context),
'subject': _('Invitation to follow %s: %s') % (model_name, document.name_get()[0][1]),
'body_html': '%s' % wizard.message,
'auto_delete': True,
+ 'message_id': self.pool['mail.message']._get_message_id(cr, uid, {'no_auto_thread': True}, context=context),
'recipient_ids': [(4, id) for id in new_follower_ids]
- }, context=context)
+ }, context=context)
mail_mail.send(cr, uid, [mail_id], context=context)
return {'type': 'ir.actions.act_window_close'}