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
1=== modified file 'account_followup/wizard/wizard_followup_print.py'
2--- account_followup/wizard/wizard_followup_print.py 2010-06-11 07:46:56 +0000
3+++ account_followup/wizard/wizard_followup_print.py 2011-09-12 13:37:20 +0000
4@@ -205,7 +205,11 @@
5 sub = tools.ustr(data['form']['email_subject'])
6 msg = ''
7 if dest:
8- tools.email_send(src,dest,sub,body)
9+ data_dict = {'form':{'partner_ids':[(6,0,[partner.id])]}}
10+ datax,frmt = netsvc.LocalService('report.account_followup.followup.print').create(cr, uid, [],data_dict,{})
11+ fname = 'followup-' + str(partner.name) +'.'+frmt
12+ attach = [(fname,datax)]
13+ tools.email_send(src, dest, sub, body,attach=attach)
14 msg_sent += partner.name + '\n'
15 else:
16 msg += partner.name + '\n'