如何仅在发票报告的每个发票页面中打印发票参考?

时间:2018-10-23 09:38:33

标签: report odoo odoo-10 qweb

我需要标题中发票报告上的显示发票参考。就像“发票草稿:〜AR-2018 / 0303”一样。它只在第一页上,我需要在每一页上显示。

我尝试这样做:〜

 <template id="external_layout_header_inherited" inherit_id="report.external_layout_header">
    <xpath expr="//div[@class='header']" position="inside">
        <div t-if="o.number">Ref.: <span t-field="o.number"/></div>
    </xpath>
</template>

但是当我打印其他报告时,就像“出售”或“购买”一样,它会影响所有报告。

所以,我的问题是,如何也在第二页的发票报告上打印发票参考?

1 个答案:

答案 0 :(得分:1)

您的方法正确,但是在发票报告中,您需要调用一个自定义的external_layout,该调用将像这样自定义标题

<t t-call="report.external_layout_custom">
    <t t-call="report.external_layout_header_custom" />
        <t t-raw="0" />
        <t t-call="report.external_layout_footer_custom" />
    </t>
</t>
相关问题