2

我正在 odoo 11 中创建一个报告,我想在其中打印可重复的页眉和页脚。下面是我的代码来做同样的事情。

标题代码

 <div class="header">
       <img  height="160" src='/module_name/static/src/img/'/>
 </div>

页脚代码

<div class="footer">
       <img  height="160" src='/module_name/static/src/img/'/>
 </div

我正在使用 wkhtmltopdf 版本 - 0.12.4。在这个版本中,自定义页脚工作正常,但页眉不工作。

进一步的研究

  • 尝试使用 wkhtmltopdf 版本 - 0.12.1 - 在此版本中,尽管使用自定义标头覆盖标头,但仍显示默认标头
  • 尝试使用 wkhtmltopdf 版本 - 0.12.2.2 - 在这个版本中,没有显示页眉和页脚(甚至没有显示默认值)
  • 尝试使用 wkhtmltopdf 版本 - 0.12.2.4 - 在此版本中,没有显示页眉和页脚(甚至不是默认值)

非常感谢您提供自定义页眉和页脚的任何帮助。提前致谢。

4

1 回答 1

0
<div class="header">
</div>

please comment the above code technical -> views -> internal_layout

after call to internal_layout like this 

<t t-call="web.internal_layout">
                <t t-foreach="docs" t-as="o">
                    <div class="page" style="font-family: 'helvetica'; font-size: 8pt;">
                        <div class="header">
于 2018-06-22T10:24:20.723 回答