问:页面上有Odoo QWeb报告页面计数器

Flo*_*her 5 report openerp odoo qweb

如何在页脚外显示页数?

嘿,

我正在为客户建立一份报告.一切都很好,除了他想在页面上显示页码(在地址栏附近)而不是页脚,这根本不起作用.

据我所知,到目前为止,报告模块中使用的subst.js负责用页码替换pagetopage类.

如果,则在report/minimal_layout模板中调用subst.js subst is True.布尔值get_pdf在页眉和页脚的方法的report.py中设置True,而对于reportcontent.如果我正在应用不良做法并编辑Odoo核心并设置subst=Truereportcontent,则报表引擎不再呈现报表的正文部分并返回undefined.

有没有人为这个问题找到合适的解决方案?

小智 0

尝试这个

<t t-set="nbr_page" t-value="0"/>  <p> <t t-set="compteur" t-value="nbr_page+1"/><t t-esc="nbr_page"/> </p> </t>
Run Code Online (Sandbox Code Playgroud)