Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

5

How to display page numbers in webkit reports?

By
zineb
on 2/18/13, 6:42 AM 4,864 views

How I can display the page numbers in a webkit report?

For example :

1 of 3
2 of 3
3 of 3

how can I enclose a question? thank you

zineb
on 3/13/13, 5:52 PM

I deleted my comment, thanks to reward contributors which answer correctly to your questions. I hope you could contribute in the future too, in a few weeks, when it will be possible for you. Bye

Cyril Gaspard (GEM)
on 3/13/13, 6:21 PM
5

tolstoj

--tolstoj--
899
| 6 5 8
Germany
--tolstoj--

hi

tolstoj
On 2/18/13, 10:22 AM

Look at Webkit-report standard header and footer. Where are all what you need ;) JS for pagination and HTML tags usage.

HEADER

   <head>
        <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
        <style type="text/css"> 
            ${css}
        </style>
        <script>
        function subst() {
           var vars={};
           var x=document.location.search.substring(1).split('&');
           for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
           var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
           for(var i in x) {
             var y = document.getElementsByClassName(x[i]);
             for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
           }
         }
        </script>
    </head>
<body style="border:0; margin: 0;" onload="subst()">
</body>

FOOTER

    <head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
    <script>
        function subst() {
        var vars={};
        var x=document.location.search.substring(1).split('&');
        for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
        var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
        for(var i in x) {
        var y = document.getElementsByClassName(x[i]);
        for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
            }
        }
    </script>
</head>
<body style="border:0; margin: 0;" onload="subst()">
    <table style="border-top: 1px solid black; width: 100%">
        <tr >
            <td style="text-align:right;font-size:12;" width="95%">Page <span class="page"/></td><td style="text-align:left;font-size:12;">  of <span class="topage"/></td>
        </tr>
    </table>
</body>

I associated the Base Sample header/footer to my report, but nothing is displayed

zineb
on 2/18/13, 12:59 PM
4
alfonso olavarria
On 5/20/13, 2:29 PM

Just put $ {id_ of what you print}.

in the footer. example

% for order in objects: $ {orden.order_id.id}

and this you will print the number

3
Jānis
On 2/18/13, 6:58 AM

I'm not a programmer, but you can try:

image description

0
Jānis
On 2/18/13, 6:55 AM

I'm not a programmer, but you can try:

--Page of --

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 2/18/13, 6:42 AM
Seen: 4864 times
Last updated: 3/16/15, 8:10 AM