Bonjour,

J'utilise la version 6.1 d'openerp et c'est mon premier rapport webkit , J'ai créé trois fichier .mako (qui contient le body) .xml(contient l'entête et le pied de page) et .py .
Lorsque j'imprime la facture je n'obtient que le body et le pied de page , l'entête est toujours cachée.

voilà mon code .xml:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="webk_invoice_header" model="ir.header_webkit">
        <field name="footer_html"><![CDATA[
            <html>
                <body>
                    <div style="font-size:8;font-family:helvetica;text-align:center;">${company.partner_id.address[0].street or ''|entity} ,
            ${company.partner_id.address[0].city or ''|entity} (${company.partner_id.address[0].state_id.name or ''|entity})
            ${company.partner_id.address[0].country_id.name or ''|entity} , 
            ${company.partner_id.address[0].zip or ''|entity} | T: 
            ${company.partner_id.address[0].phone_free or ''|entity} - F: ${company.partner_id.address[0].fax or ''|entity}
            | ${company.partner_id.address[0].email or ''|entity} <div>
            <div id="footer">TPS: R-131198657 | TVQ: 10-1152-2242 TQ-0001 ME | RBQ: 2968-9818-26
            </div>
                </body>
            </html>]]>
            </field>
            <field name="orientation">Portrait</field>
            <field name="format">Letter</field>
            <field name="html"><![CDATA[
            <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: 0;" onload="subst()">
                    <table class="header" style="border-bottom: 0px solid black; width: 100%">
                        <tr >
                        <td>
                            <td width="94%" style="text-align:left>${helper.embed_logo_by_name('metal_logo')|n}</td>
                            <td style="font-size:12;text-align:right"><span class="page"/></td>
                            <td ;font-size:12;">  / <span /></td>
                        </td>
     			   		%for inv in objects :
	  					<td style='text-align:right'>
								    %if inv.type == 'out_invoice' :
								      ${_("Customer Invoice")} 
								    %elif inv.type == 'in_invoice' :
								      ${_("Supplier Invoice")} 
								    %elif inv.type == 'out_refund' :
								      ${_("Customer Refund")} 
								    %elif inv.type == 'in_refund' :
								      ${_("Supplier Refund")} 
								    %endif
								    %if inv.state == 'cancel' :
								      ${_("Cancelled")} 
								    %endif
		  				    <td  style='text-align:right' class="value down"> 
		  				    <br/> <p style="font-weight:normal"> ${inv.number or ''} <p/>
   							</td>
   							%endfor
   						</tr>
   					</table>
				</body>
			</html>]]>
        </field>
            <field name="name">Report Account Invoice</field>
        </record>

    	<report id="account_invoice_webkit" model="report.account.invoice"
                name="report.account.invoice.webkit"
                string="Facture"
                file="metal_extend/report/account_print_invoice.mako" 
                report_type="webkit"
                auto="False"
                header="True"
                webkit_header="webk_invoice_header" /> 
        
    </data>
</openerp>
Aidez moi SVP et merci d'avance !!