[9.0][FIX][report_custom_filename] API migration (#92)
parent
e20ffe75a4
commit
98f8b336f7
|
@ -16,13 +16,11 @@ class Reports(main.Reports):
|
|||
action = json.loads(action)
|
||||
context = dict(http.request.context)
|
||||
context.update(action["context"])
|
||||
report_xml = http.request.session.model('ir.actions.report.xml')
|
||||
reports = report_xml.search(
|
||||
[('report_name', '=', action['report_name'])],
|
||||
0, False, False, context)
|
||||
report_xml = http.request.env['ir.actions.report.xml']
|
||||
reports = report_xml.search([
|
||||
('report_name', '=', action['report_name']),
|
||||
('download_filename', '!=', False)])
|
||||
for report in reports:
|
||||
if not report.download_filename:
|
||||
continue
|
||||
objects = http.request.session.model(context['active_model'])\
|
||||
.browse(context['active_ids'])
|
||||
generated_filename = mail_template.mako_template_env\
|
||||
|
|
Loading…
Reference in New Issue