[FIX] email_template: when generating reports
in batch, update the values for all res_ids, not only the last one of the current template. bzr revid: tde@openerp.com-20131126110742-aecac7r0zyappo0a
This commit is contained in:
parent
41ca7536e0
commit
6f322004cc
|
@ -369,7 +369,7 @@ class email_template(osv.osv):
|
||||||
attachment_ids=[attach.id for attach in template.attachment_ids],
|
attachment_ids=[attach.id for attach in template.attachment_ids],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add report in attachments
|
# Add report in attachments: generate once for all template_res_ids
|
||||||
if template.report_template:
|
if template.report_template:
|
||||||
for res_id in template_res_ids:
|
for res_id in template_res_ids:
|
||||||
attachments = []
|
attachments = []
|
||||||
|
@ -388,7 +388,8 @@ class email_template(osv.osv):
|
||||||
report_name += ext
|
report_name += ext
|
||||||
attachments.append((report_name, result))
|
attachments.append((report_name, result))
|
||||||
|
|
||||||
values['attachments'] = attachments
|
for res_id in template_res_ids:
|
||||||
|
results[res_id]['attachments'] = attachments
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue