Question

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 ?

Was it helpful?

Solution

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

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top