From f82a01d0feeb7902dfc2951a2b3dacb90de56349 Mon Sep 17 00:00:00 2001 From: Juan Jose Scarafia Date: Tue, 27 Dec 2016 10:05:03 -0300 Subject: [PATCH] [9.0][FIX] fix custom filename making a browse over a browse --- report_custom_filename/controllers/reports.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/report_custom_filename/controllers/reports.py b/report_custom_filename/controllers/reports.py index 22808a00..5ed549af 100644 --- a/report_custom_filename/controllers/reports.py +++ b/report_custom_filename/controllers/reports.py @@ -17,10 +17,10 @@ class Reports(main.Reports): context = dict(http.request.context) context.update(action["context"]) report_xml = http.request.session.model('ir.actions.report.xml') - report_ids = report_xml.search( + reports = report_xml.search( [('report_name', '=', action['report_name'])], 0, False, False, context) - for report in report_xml.browse(report_ids): + for report in reports: if not report.download_filename: continue objects = http.request.session.model(context['active_model'])\