<pageCount/> not rendering in OpenERP 7

独自空忆成欢 提交于 2019-12-10 02:29:16

问题


I am working with OpenERP 7

I want to modify my invoice report footer to show the current page and the total number of pages like this :

page:1/2 in the first page and

page:2/2 in the second page...

this is my code:

<place x="1.3cm" y="0cm" height="1.55cm" width="19.0cm">
                <para style="main_footer">[[ company.rml_footer ]]</para>
                <para style="main_footer">Page: <pageNumber/>/<pageCount/></para>
</place>

but pageCount don't return any number. What's wrong ?


回答1:


Hello everybody and thank you all for your answers.

In fact, after a deep and hard search I discovered that <pageCount /> tag will not return any value when we put it in a <place /> tag so I put it in a <drawstring /> tag and it returns the total number of pages. Here is my code:

 <place x="1.3cm" y="0cm" height="1.9cm" width="19.0cm">
           <para style="main_footer">
                 Page: <pageNumber/>/
           </para>
 </place>
 <drawString x="11.36cm" y="1.64cm" ><pageCount/></drawString> 

I know that this solution is not professional, but it did work, hope that this bug will be fixed soon.

Regards




回答2:


It is a bug that not fixed yet. Take a look here pageCount Bug. Maybe problem can be solved by a small patch attached there.




回答3:


If you write, in your footer: The total number of page will be written at the exact place chosen (here x="10.5cm" y="0.8cm", x and y start from the left-down corner). Beware that if you type: Total Pages: then the tag will overlap with the label 'Total Pages:' (this is because the is filled as a final step). So make sure to have this tag alone in the tag at the coordinates you'll have chosen.



来源:https://stackoverflow.com/questions/19937941/pagecount-not-rendering-in-openerp-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!