[FIX] fix res_id link when sending an email template
authortfr@openerp.com <>
Fri, 20 Jan 2012 13:03:47 +0000 (14:03 +0100)
committertfr@openerp.com <>
Fri, 20 Jan 2012 13:03:47 +0000 (14:03 +0100)
bzr revid: tfr@openerp.com-20120120130347-fj4a8v3itlwjf2ai

addons/mail/wizard/mail_compose_message.py

index de4bcee..1802230 100644 (file)
@@ -228,7 +228,7 @@ class mail_compose_message(osv.osv_memory):
                     # processed as soon as the mail scheduler runs.
                     mail_message.schedule_with_attach(cr, uid, email_from, to_email(email_to), subject, rendered_body,
                         model=mail.model, email_cc=to_email(email_cc), email_bcc=to_email(email_bcc), reply_to=reply_to,
-                        attachments=attachment, references=references, res_id=int(mail.res_id),
+                        attachments=attachment, references=references, res_id=int(active_id),
                         subtype=mail.subtype, headers=headers, context=context)
             else:
                 # normal mode - no mass-mailing