[FIX] email_template now use the new get_pdf method on the report model in order to avoid the blocking bug of generating a pdf with a public request.session
bzr revid: sle@openerp.com-20140319185350-5t8iuvnzikwfajei
This commit is contained in:
parent
060a171a26
commit
1c5a57a129
|
@ -449,7 +449,7 @@ class email_template(osv.osv):
|
|||
ctx['lang'] = self.render_template_batch(cr, uid, template.lang, template.model, [res_id], context)[res_id] # take 0 ?
|
||||
|
||||
if report.report_type in ['qweb-html', 'qweb-pdf']:
|
||||
result, format = self.pool['report'].get_pdf(report, res_id, context=ctx), 'pdf'
|
||||
result, format = self.pool['report'].get_pdf(cr, uid, [res_id], report_service, context=ctx), 'pdf'
|
||||
else:
|
||||
result, format = openerp.report.render_report(cr, uid, [res_id], report_service, {'model': template.model}, ctx)
|
||||
|
||||
|
|
|
@ -224,8 +224,13 @@ class Report(osv.Model):
|
|||
if context is None:
|
||||
context = {}
|
||||
|
||||
ids = [int(i) for i in ids.split(',')]
|
||||
ids = list(set(ids))
|
||||
if isinstance(ids, str):
|
||||
ids = [int(i) for i in ids.split(',')]
|
||||
if isinstance(ids, list):
|
||||
ids = list(set(ids))
|
||||
if isinstance(ids, int):
|
||||
ids = [ids]
|
||||
|
||||
report = self._get_report_from_name(cr, uid, report_name)
|
||||
report_obj = self.pool[report.model]
|
||||
docs = report_obj.browse(cr, uid, ids, context=context)
|
||||
|
|
Loading…
Reference in New Issue