Merge lp:~openerp-dev/openobject-addons/5.0-opw-17174-ach into lp:openobject-addons/5.0

Proposed by Anup(SerpentCS)
Status: Merged
Merged at revision: 2921
Proposed branch: lp:~openerp-dev/openobject-addons/5.0-opw-17174-ach
Merge into: lp:openobject-addons/5.0
Diff against target: 16 lines (+5/-1)
1 file modified
account_followup/wizard/wizard_followup_print.py (+5/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/5.0-opw-17174-ach
Reviewer Review Type Date Requested Status
Raphael Collet (OpenERP) (community) Approve
Review via email: mp+74995@code.launchpad.net

Description of the change

Hello,

When you try to send followups to customers the attachments were not being sent with the email.

This fixes the issue.

Thanks.

To post a comment you must log in.
Revision history for this message
Raphael Collet (OpenERP) (rco-openerp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_followup/wizard/wizard_followup_print.py'
--- account_followup/wizard/wizard_followup_print.py 2010-06-11 07:46:56 +0000
+++ account_followup/wizard/wizard_followup_print.py 2011-09-12 13:37:20 +0000
@@ -205,7 +205,11 @@
205 sub = tools.ustr(data['form']['email_subject'])205 sub = tools.ustr(data['form']['email_subject'])
206 msg = ''206 msg = ''
207 if dest:207 if dest:
208 tools.email_send(src,dest,sub,body)208 data_dict = {'form':{'partner_ids':[(6,0,[partner.id])]}}
209 datax,frmt = netsvc.LocalService('report.account_followup.followup.print').create(cr, uid, [],data_dict,{})
210 fname = 'followup-' + str(partner.name) +'.'+frmt
211 attach = [(fname,datax)]
212 tools.email_send(src, dest, sub, body,attach=attach)
209 msg_sent += partner.name + '\n'213 msg_sent += partner.name + '\n'
210 else:214 else:
211 msg += partner.name + '\n'215 msg += partner.name + '\n'