Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3340 Vizualizări

i tried to customise my report view on sale module.

first i tried to use the module studio, but this solution doesn't allow me to customise the header of my report.


second, i follow the step of this tutorial https://gist.githubusercontent.com/winston6071/982c4f17bccd1fc8b52d/raw/34014c8da92a1c204c57df8880f961c4d02683fe/qweb%2520reporting%2520extra%2520footer%2520header%2520body%2520new%2520report%2520


. at the end , i don't get error, the footer is displayed but not the header. 


who have solution for me?

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

We need to inherit the previous report header.

<template id="report_layout_invoice_ahch_header" inherit_id="web.external_layout_header">>
    <t t-if ="o and 'company_id' in o">
        <t t-set="company" t-value="o.company_id"/>
        <t t-set="customer" t-value="o.partner_id"/>
    </t>

    <div class="header">
        <div class="row" style="font-size:11px; line-height=80%">
            <img  t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 140px;"/>
        <div class="col-xs-4 col-xs-offset-2" style="margin-top:10px">
             <span t-field="company.name" style="color:blue"/><br/>
             <span t-field="company.street"/><br/>
             <span t-field="company.street2"/><br/>
             <span t-field="company.country_id"/><span t-field="company.zip"/><br/>
             Phone: <span t-field="company.phone"/><br/>
             Fax: <span t-field="company.fax"/><br/>
             Email: <span t-field="company.email"/><br/>
             <span t-field="company.website"/><br/>
        </div>
        </div>

            <hr style="height:3px;border:none;color:#FF0000;background-color:#FF0000;margin-top:0px;margin-bottom:12px"/>
        </div>

</template>

i hope it will helpful..
Imagine profil
Abandonează