Hi, I want to pass data to qweb report and print that data in report.
python code:
pdf = self.env['report'].sudo().get_pdf(self.ids, report_name, data={'test_variable': 'test_passed'})
report template :
<?xml version="1.0" encoding="utf-8"?> <odoo> <data> <report id="my_module.report_id" model="my_module.report_model" string="Some Model Report" report_type="qweb-pdf" name="my_module.daily_report" file="my_module.daily_report_file" menu="False"/> <template id="my_module.daily_report"> <t t-call="report.html_container"> <t t-call="report.internal_layout"> <div class="page"> <div class="header"> <h4>HEADER</h4> <-- i want to see "test_passed" value below --> <span t-esc="data.test_variable"/> </div> </div> </t> </t> </template> </data> </odoo>
When i create a pdf, i don't see variable value.
I am working on odoo-10 .