在我的自定义模块中,我试图将默认发票报告更改为自定义报告。这是报告标签
<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
用于加载发送邮件附件。发送邮件附件是基于此 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"
/>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句