Odoo Help


Odoo 9 Qweb-html from wizard

Marios Kleanthous
on 10/17/16, 10:01 AM 839 views

Hello all,

I have a report that shows all the projects. On top of that I have created a wizard that allow the user to filter the results and call the previous report with only the select data to be shown.

The report by itself works just fine showing all the reports in html and the wizard works also if I request the report in pdf

The problem is that if I call the report from the wizard using the 'report_type': 'qweb-html' option the selected data (selections/filtering made by the user) are not passed to the render_html function. Just to add one more hint, if I use 'report_type': 'qweb-pdf' I have the exact same problem, and that's why I use 'report_type': 'pdf' to print the report in pdf. It seems that whenever I use qweb-html or qweb-pdf as a report type the controller doesn't send the wizard form data to the render_html.

Can you please help me with this issue? Below is my wizard code that calls the report to give you an idea. pdfPrint variable is based on which button you press on the wizard (Show in html->pdfPrint=0, Show in PDF->pdfPrint=1).

Part of Wizard Class:

datas = { 'ids' : res,
'model' : 'project.reportwizard',
'form' : self.read(cr, uid, ids, context=context)[0],
'context' : context,}
reportType = 'qweb-html'
pdfPrint = context.get('pdfPrint',1)
if pdfPrint:
    reportType = 'pdf'
return { 'type' : 'ir.actions.report.xml',
'report_name' : 'project.report_project_summary',
'report_type': reportType,
'datas' : datas,}

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/17/16, 10:01 AM
Seen: 839 times
Last updated: 10/17/16, 10:26 AM