【问题标题】:How to repeat the invoice number on each pages of an invoice PDF如何在发票 PDF 的每一页上重复发票编号
【发布时间】:2017-01-26 15:57:40
【问题描述】:

当我生成发票 PDF 以供下载或打印时,我需要在同一发票的所有页面中显示发票编号。我该怎么做?

【问题讨论】:

    标签: report odoo odoo-8 qweb


    【解决方案1】:
    <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>
    

    【讨论】:

    • 这会将&lt;div&gt; 元素放在每个具有external_layout_header 并且还具有名为number 的字段的报告中。
    【解决方案2】:

    您可以像上面的示例一样在页眉或页脚中放置和跨越

    <div class="header">
      <div class="row">
         <div class="col-12">
              <span class="page"/>/<span class="topage"/>
         </div>
     </div>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多