Hey!
In Odoo 14.0, I would like to print a PDF of a qweb template for several models / docs but when I open my PDF, there is only one page with all my docs which are superimposed. I mean, all the content is there but on the same page and not One page for each doc.
datas = {'ids': product_ids}
res = self.env['product.template'].search([('id', 'in', product_ids)]).read(['name'])
res = res and res[0] or {}
res['template_code'] = code
res['date_start'] = date_start
res['date_end'] = date_end
res['pricelist'] = pricelist
datas['form'] = res
datas['active_model'] = 'product.template'
return self.env.ref(template).report_action(product_ids, data=datas)
This code is called when I press an action and I get a PDF back but as I said, I only get one page with all my products information overlapping each other (5 products names at the same place and so on...)
Do you know how can I print a custom report but with multiple pages?
<template id="my_id" name="my_name">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<div class="page">
//Content of my template
</div>
</t>
</t>
</template>