如何在页脚之外显示页数?
嘿,
我正在为客户构建报告。一切都很好,只是他想在页面上(地址字段附近)显示页码而不是页脚,这根本不起作用。
据我所知,报告模块中使用的 subst.js 负责替换 page
和 topage
带有页码的类。
subst.js 在report/minimal_layout 模板中被调用,如果subst is True
. bool 值在 get_pdf
的 report.py 中设置。 True
的页眉和页脚方法, 而 reportcontent
为假.如果我应用不好的做法并编辑 Odoo 核心并设置 subst=True
对于 reportcontent
,报表引擎不再呈现报表的正文部分并返回未定义。
有没有人找到适合这个问题的解决方案?
最佳答案
Simply put this snippet where you want to display page count.
<ul class="list-inline">
<li>Page:</li>
<li><span class="page"/></li>
<li>/</li>
<li><span class="topage"/></li>
</ul>
关于report - 问: Odoo QWeb report page counter on page,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32826513/