diff options
| author | Denis Ledoux <dle@odoo.com> | 2015-12-01 17:20:35 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2015-12-01 17:23:32 +0100 |
| commit | 258c11a9a6fa00a83070de750ab19a916734d040 (patch) | |
| tree | 5ee4d41dc3e75f3d9dce19702d27278aa405ac08 /addons/mass_mailing/wizard | |
| parent | 19fe77b7d71aed1b25bc3f15538eea0a5510020b (diff) | |
[FIX] mass_mailing: unsubscribe link when testing the mailing
When testing a mass mailing before sending the mailing
to the contacts (which well, is always the case),
the local links were not replaced by absolute links,
and the override done on the method `send_get_email_dict`
to convert the link `/unsubscribe_from_list` to the actual
unsubscription link was not working, as it relied
on the absolute link.
opw-657982
Diffstat (limited to 'addons/mass_mailing/wizard')
| -rw-r--r-- | addons/mass_mailing/wizard/test_mailing.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/mass_mailing/wizard/test_mailing.py b/addons/mass_mailing/wizard/test_mailing.py index c0601ea29d5..b86f4ea32a0 100644 --- a/addons/mass_mailing/wizard/test_mailing.py +++ b/addons/mass_mailing/wizard/test_mailing.py @@ -25,6 +25,8 @@ class TestMassMailing(osv.TransientModel): test_emails = tools.email_split(wizard.email_to) mail_ids = [] for test_mail in test_emails: + # Convert links in absolute URLs before the application of the shortener + self.pool['mail.mass_mailing'].write(cr, uid, [mailing.id], {'body_html': self.pool['mail.template']._replace_local_links(cr, uid, mailing.body_html, context)}, context=context) mail_values = { 'email_from': mailing.email_from, 'reply_to': mailing.reply_to, |
