将默认发票报告更改为自定义报告?
问题描述:
在我的自定义模块中我试图将默认发票报告更改为自定义报告。这是报告标签将默认发票报告更改为自定义报告?
<report
id="account.account_invoices"
model="account.invoice"
string="Invoice custom report"
report_type="qweb-pdf"
name="custom_invoice_report.custom_invoice_template"
file="custom_invoice_report.custom_invoice_template"
/>
我也在我的代码中定义了<template id="custom_invoice_template">
。 但打印了默认发票报告。如何更改此自定义报告?
注
我用id="account.account_invoices
装载发送邮件发送attachment.The邮件附件加载基于此ID。
答
我们需要添加属性attachment_use =“False”加载新的报告更改。在发票报表中有attachment_use =“True”表示一旦我们打印报表并且输出结果会一样。
尝试用下面的代码:
<report
id="account.account_invoices"
model="account.invoice"
string="Invoice custom report"
report_type="qweb-pdf"
attachment_use="False"
name="custom_invoice_report.custom_invoice_template"
file="custom_invoice_report.custom_invoice_template"
/>
:谢谢你的相关信息 – aslamsha22