Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<pageCount/> not rendering in OpenERP 7

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 ?

like image 468
Andromida Avatar asked Nov 12 '13 19:11

Andromida


2 Answers

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

like image 173
Andromida Avatar answered Oct 17 '22 06:10

Andromida


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.

like image 42
Keyur Avatar answered Oct 17 '22 07:10

Keyur