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.

0

how to set 0 margins in webkit reports in v7?

By
René
on 3/14/13, 6:04 PM 1,857 views

Hi I try to modify webkit-headers to fit my needs. I would like to place a header-image that spreads from the complete page from left to right. So I tried to set the margins in webkit-header to "0.00", but then margin is always about 1cm.

How is it possible to set the margin to 0 ?

I tried with a margin "0.01". Then it looks alomst as it should be but it is not 0 !

How can I place a header-image from left to right whith different text-margin, e.g. 1cm ?

Greetings René

Have you tried a negative value? Or if you gives more precision to your value something like 0.0000001? It mights be ugly but I think 0.0 means False so you need to set something else than 0.

Camptocamp SA
on 3/15/13, 2:46 PM
2

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
4341
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 3/18/13, 8:36 AM

Hello,

You can set the margin for header as following in report's ".xml" file:

<html>
    <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>
        <style type="text/css">
            ${css}
        </style>
    </head>
    <body style="border:0; margin:15  ;" onload="subst()">
        <table style="border-bottom: 1px solid black; width: 100%">
           <tr >
               <td style="text-align:right;font-size:12;" width="20%">${ helper.embed_image('png',company.logo,200,40)|n }</td>  (This is the header image. You can get it in complete page by set it's width)
               <td style="text-align:right;font-size:12;" width="80%"></br></br>${ company.rml_header1 }</td>
           </tr>
       </table> ${_debug or ''|n} </body>   
 </html>]]>

And you can set the margins for body data as following: <field eval="50.0" name="margin_top"/> <field eval="5.0" name="margin_bottom"/>

Thanks, Serpent Consulting Services.

0
alfonso olavarria
On 5/20/13, 3:50 PM

using css. with that you can put your pictures where you want

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: 3/14/13, 6:04 PM
Seen: 1857 times
Last updated: 3/16/15, 8:10 AM