Hello ,i m trying to print account invoice report from sale order from print menu.
when i try to print it from custom button (print invoice) which i have made in sale order ,by linking sale order and invoice by invoice_ids ,i m getting Invoice report .
But when i try to print it from Print menu,empty report are generating.
Below is the method I'm calling.
@api.multi
def invoice_print(self):
self.ensure_one()
self.sent = True
return self.env['report'].get_action(self, 'account.report_invoice')
when i m calling this method from my button it is generating report.
But when i m trying to call this method from print menu in Sale order by
<report
id="some_unique_name"
string=" Invoice"
model="sale.order"
report_type="qweb-pdf"
file="module.report_sale_invoice"
name="module.report_sale_invoice"/>
<template id="report_sale_invoice">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="doc">
<t t-esc="doc.invoice_ids.invoice_print()"/>
</t>
</t>
</template>