[FIX] account_followup : Attachments are now being sent with the email(Case:17174)
authorAnup (OpenERP) <ach@tinyerp.com>
Mon, 12 Sep 2011 13:25:23 +0000 (18:55 +0530)
committerAnup (OpenERP) <ach@tinyerp.com>
Mon, 12 Sep 2011 13:25:23 +0000 (18:55 +0530)
lp bug: https://launchpad.net/bugs/834781 fixed

bzr revid: ach@tinyerp.com-20110912132523-33037xgy8paqt430

addons/account_followup/wizard/wizard_followup_print.py

index c1a9b7b..3cdb43c 100644 (file)
@@ -205,7 +205,11 @@ class followup_all_print(wizard.interface):
                 sub = tools.ustr(data['form']['email_subject'])
                 msg = ''
                 if dest:
-                    tools.email_send(src,dest,sub,body)
+                    data_dict = {'form':{'partner_ids':[(6,0,[partner.id])]}}
+                    datax,frmt = netsvc.LocalService('report.account_followup.followup.print').create(cr, uid, [],data_dict,{})
+                    fname = 'followup-' + str(partner.name) +'.'+frmt
+                    attach = [(fname,datax)]
+                    tools.email_send(src, dest, sub, body,attach=attach)
                     msg_sent += partner.name + '\n'
                 else:
                     msg += partner.name + '\n'