我在 ODOO 中为account.invoice模型创建了 qweb 报告。
问题:
当我们以 pdf 格式下载报告时,它命名为module_name.report_name,就像我的情况一样
“custom_reports_ept.report_export_invoice”。
我想要做的是将可下载的 pdf 名称设置为"Export Invoice"或"Invoice VDG290-15-16" (VDG290-15-16 is invoice Number)"。
我怎么能这样做?
这是我的xml代码,
<report
string="Export Invoice"
id="account.invoice_export"
model="account.invoice"
report_type="qweb-pdf"
name="custom_reports_ept.report_export_invoice"
file="custom_reports_ept.report_export_invoice"
/>
这是 qweb 模板。
<template id="report_export_invoice">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<div class="page">
<div class="oe_structure"/>
<!-- report body -->
</div>
</t>
</t>
</template>