[FIX] mass_mailing: fixed test mailing wizard, still using unsubscribe url that is
now delegated on the mail_mail model. bzr revid: tde@openerp.com-20140417122633-bej72c8yhv2y2y4z
This commit is contained in:
parent
f1f3e73604
commit
a32ccdbbd1
|
@ -25,16 +25,14 @@ class TestMassMailing(osv.TransientModel):
|
|||
test_emails = tools.email_split(wizard.email_to)
|
||||
mail_ids = []
|
||||
for test_mail in test_emails:
|
||||
body = mailing.body_html
|
||||
unsubscribe_url = self.pool['mail.mass_mailing'].get_unsubscribe_url(cr, uid, mailing.id, 0, email=test_mail, context=context)
|
||||
body = tools.append_content_to_html(body, unsubscribe_url, plaintext=False, container_tag='p')
|
||||
mail_values = {
|
||||
'email_from': mailing.email_from,
|
||||
'reply_to': mailing.reply_to,
|
||||
'email_to': test_mail,
|
||||
'subject': mailing.name,
|
||||
'body_html': body,
|
||||
'body_html': mailing.body_html,
|
||||
'auto_delete': True,
|
||||
'mailing_id': wizard.mass_mailing_id.id,
|
||||
}
|
||||
mail_ids.append(Mail.create(cr, uid, mail_values, context=context))
|
||||
Mail.send(cr, uid, mail_ids, context=context)
|
||||
|
|
Loading…
Reference in New Issue