答案 0 :(得分:1)
“打印”菜单中的“报告”菜单按钮:
<report
id="saleorder_quotation_report"
model="account.invoice"
string="Print Invoice"
report_type="qweb-pdf"
name="module_name.your_report_id"
file="module_name.your_report_id"
attachment_use="False"
/>
此处为示例代码:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="put_your_xml_id">
<t t-call="module_name.external_layout">
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})" />
<div class="page">
<div class="col-xs-6" style = "margin-top:15px;">
<strong>Invoicing address:</strong>
<div t-field="o.partner_id"
<!-- Here you make your own code using div and other tags -->
</div>
</div>
</t>
</template>
<template id="your_report_id">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="module_name.put_your_xml_id" t-lang="o.partner_id.lang"/>
</t>
</t>
</template>
</data>