From 590fe996ad8bfad6e6c52217604fece0243535c6 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Wed, 2 Apr 2014 14:12:37 +0200 Subject: [PATCH] [FIX] as render_report is adapted to qweb, no need to filter in _exec_action bzr revid: sle@openerp.com-20140402121237-t9tsnm9birhekj0b --- openerp/tools/test_reports.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/openerp/tools/test_reports.py b/openerp/tools/test_reports.py index 9aa55233a27..c008c20ae29 100644 --- a/openerp/tools/test_reports.py +++ b/openerp/tools/test_reports.py @@ -38,7 +38,7 @@ _logger = logging.getLogger(__name__) _test_logger = logging.getLogger('openerp.tests') -def try_report(cr, uid, rname, ids, data=None, context=None, our_module=None): +def try_report(cr, uid, rname, ids, data=None, context=None, our_module=None, report_type=None): """ Try to render a report with contents of ids This function should also check for common pitfalls of reports. @@ -281,10 +281,7 @@ def try_report_action(cr, uid, action_id, active_model=None, active_ids=None, ids = datas.get('ids') if 'ids' in datas: del datas['ids'] - if action.get('report_type') in ['qweb-pdf', 'qweb-html']: - res = registry['report'].get_html(cr, uid, [], action.get('report_name'), data=datas, context=context) - else: - res = try_report(cr, uid, 'report.'+action['report_name'], ids, datas, context, our_module=our_module) + res = try_report(cr, uid, 'report.'+action['report_name'], ids, datas, context, our_module=our_module) return res else: raise Exception("Cannot handle action of type %s" % act_model)