Someone please help me with render_qweb_pdf() from Odoo. I am a beginner in odoo as well as in XML,
My python code
@api.model def print_invoice(self): x = 'pawan' y = 18 report = { "report": { "name": x, "roll": y } } # import pdb; pdb.set_trace() xx = self.env.ref('fnf_stock.stock_pdf').sudo( ).render_qweb_pdf(self.id, report) return xx
My XML code<template id="stock_picking" name="stock_picking"> <t t-call="web.html_container"> <t t-as="o" t-foreach="docs"> <!-- article class is very important to display content --> <div class="article"> <div class="row"> <t t-esc="report['name']"/> <t t-esc="report['roll']"/> </div> </div> </t> </t> </template>