Report Odoo 12在每页上报告发票详细信息。如何实现?

Report Odoo 12在每页上报告发票详细信息。如何实现?,report,reporting,odoo-12,qweb,Report,Reporting,Odoo 12,Qweb,我使用的是Odoo 12,无论是报告发票还是销售报告,我都有法律要求。 我必须在每个报告页(不仅仅是第一页)上显示文档详细信息(文档类型、编号、日期等) 因此,core Odoo report invoice允许我仅在第一页打印此信息。 在Odoo报告发票中,我们有(在第一页): 下面是文件详细信息,包括编号、日期等 <template id="external_layout_standard_customise" inherit_id="web.external_layout_stand

我使用的是Odoo 12,无论是报告发票还是销售报告,我都有法律要求。 我必须在每个报告页(不仅仅是第一页)上显示文档详细信息(文档类型、编号、日期等)

因此,core Odoo report invoice允许我仅在第一页打印此信息。 在Odoo报告发票中,我们有(在第一页):

下面是文件详细信息,包括编号、日期等

<template id="external_layout_standard_customise" inherit_id="web.external_layout_standard">
    <xpath expr="//div[hasclass('header')]" position="inside">
        <t t-if="o and o._name == 'sale.order'">
            <div class="pull-right">
                <h2>
                    <t t-if="not (env.context.get('proforma', False) or is_pro_forma)">
                        <span t-if="doc.state not in ['draft','sent']">Order # </span>
                        <span t-if="doc.state in ['draft','sent']">Quotation # </span>
                    </t>
                    <t t-if="env.context.get('proforma', False) or is_pro_forma">
                        <span>Pro-Forma Invoice # </span>
                    </t>
                    <span t-field="doc.name"/>
                </h2>
            </div>
        </t>
    </xpath>
</template>
我需要做的是在页面顶部显示文档详细信息(从第2页开始),如:

我可以在qweb中将所需的值添加到变量中,但现在不知道如何检查page>1

除了第一页之外,有人能帮我把这些信息放在每一页的顶部吗? 我已搜索,但找不到任何解决方案。

pmatos

尝试将其添加到报告模板中。在这种情况下,您必须在标题部分添加内容数据(包括文档类型、编号、日期等)


秩序#
报价单#
形式发票

谢谢

Thank you@Dipen Shah-我已经试过了,正如你所说的,问题是我添加到标题中的任何内容都与第二页和转发页的顶部发票内容重叠。请参考:您可以调整报告模板的标题间距吗?太好了。我认为这就是解决办法。我的问题是(语言仍然是我的障碍)。我需要增加页眉下边距还是减少“页面”上边距???你能帮我做一些css或者样式吗?你只需要增加页眉间距(即页眉和页面之间的间距)。对于报告外观,您还可以添加上/下页边距样式,但这取决于您的报告样式。对于你面临的语言问题?谢谢迪本。我会随时通知你的
Customer: Customer Name
Document Type: Invoice
Number: INV XXX/2020
Issue Date: 10-10-2020
<template id="external_layout_standard_customise" inherit_id="web.external_layout_standard">
    <xpath expr="//div[hasclass('header')]" position="inside">
        <t t-if="o and o._name == 'sale.order'">
            <div class="pull-right">
                <h2>
                    <t t-if="not (env.context.get('proforma', False) or is_pro_forma)">
                        <span t-if="doc.state not in ['draft','sent']">Order # </span>
                        <span t-if="doc.state in ['draft','sent']">Quotation # </span>
                    </t>
                    <t t-if="env.context.get('proforma', False) or is_pro_forma">
                        <span>Pro-Forma Invoice # </span>
                    </t>
                    <span t-field="doc.name"/>
                </h2>
            </div>
        </t>
    </xpath>
</template>