[FIX] report: Traceback on print report from wizard.
Go to Product Variant >> Select any Product Variant >> Print Report Of Price List >> select any Price List and Click on print button it's gives traceback like: http://www.awesomescreenshot.com/image/1288867/b6639baf8cb94e3a90ce9d347b3f4f35 Introduced by https://github.com/odoo/odoo/commit/da3d2fb1dc76654e630fba27ca3dcf03002d9431
This commit is contained in:
committed by
Yannick Tivisse
parent
a0b676921b
commit
9c012ad07e
@@ -104,10 +104,11 @@ class ReportController(Controller):
|
||||
cr, uid = request.cr, request.uid
|
||||
report = request.registry['report']._get_report_from_name(cr, uid, reportname)
|
||||
filename = "%s.%s" % (report.name, "pdf")
|
||||
ids = [int(x) for x in docids.split(",")]
|
||||
obj = request.env[report.model].browse(ids)
|
||||
if report.print_report_name and not len(obj) > 1:
|
||||
filename = eval(report.print_report_name, {'object': obj, 'time': time})
|
||||
if docids:
|
||||
ids = [int(x) for x in docids.split(",")]
|
||||
obj = request.env[report.model].browse(ids)
|
||||
if report.print_report_name and not len(obj) > 1:
|
||||
filename = eval(report.print_report_name, {'object': obj, 'time': time})
|
||||
response.headers.add('Content-Disposition', content_disposition(filename))
|
||||
response.set_cookie('fileToken', token)
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user