Hello ,
I m facing an issue while printing report which is calling report of
one model to other model,it is generating empty report when print via print menu
but when i do it from a custom button ( which i have created ) it is generating report.
model_ids = link between two model
@api.multi
def report_print(self):
self.ensure_one()
return self.env['report'].get_action(self, 'model.report_name')
when i call this method by button click from model one
model_ids.report_print() -->it is generating report
but when i print from print menu,i m getting blank report.
<report
id="some_unique_id"
string="Name"
model="model.one"
report_type="qweb-pdf"
file="model_one.report_name_un"
name="model_one.report_name_un"/>
<template id="report_name_un">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="doc">
<t t-esc="doc.model_ids.report_print() "/>
</t>
</t>
I have checked function it is calling ,but it is giving blank report when called from menu,whereas it is generating report when called from button.