0
votes

system: Odoo V8.

Issue: On The last PDF order i discovered that somehow the template is not applied. (only flat ugly text) All the fields are here, including footer but the header is not here and there is no style applied nor pictures (as it was by default in the previous reports) The same occurred for all the PDF reports so i guess i somehow changed or killed the template. How may i fix it?

Before: After the install everything was correct. The base template was applied and was ok for both sales and purchase PDF files.

UPDATE: The content of the model in the company setting (settings=>company under the report tab) is correct (when i preview the page everything is ok)

The external_layout qview is :

<?xml version="1.0"?>
<t t-name="report.external_layout">
    <!-- Multicompany -->
    <t t-if="o and 'company_id' in o">
        <t t-set="company" t-value="o.company_id"/>
    </t>
    <t t-if="not o or not 'company_id' in o">
        <t t-set="company" t-value="res_company"/>
    </t>

    <t t-call="report.external_layout_header"/>
    <t t-raw="0"/>
    <t t-call="report.external_layout_footer"/>
</t>

The external_layout_header qview is (we can clearly see the call to the RML header which is what is expected):

<?xml version="1.0"?>
<t t-name="report.external_layout_header">
    <div class="header">
        <div class="row">
            <div class="col-xs-3">
                <img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 45px;"/>
            </div>
            <div class="col-xs-9 text-right" style="margin-top:20px;" t-field="company.rml_header1"/>
        </div>
        <div class="row zero_min_height">
            <div class="col-xs-12">
                <div style="border-bottom: 1px solid black;"/>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-3">
                <div t-field="company.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}" style="border-bottom: 1px solid black;"/>
            </div>
        </div>
    </div>
</t>

Both footer and header seem included. but the result of all the PDF reports is: - no header - content ok (but no font nor style) - footer ok (but no font nor style)

Thank you

2
when i remove the call for the footer in external_layout then it is not displayed on the reports. That means external_layout is correctly called as a template.Stéphane TAMPIGNY
whatever i change in external_layout_header does nothingStéphane TAMPIGNY

2 Answers

0
votes

Hello Stephane TAMPIGNY,

Plase read this post

Click to See the Answer for your questioned post References

I hope this should helpful for you ..:)

0
votes

I found out that my issue was similar to this one : https://github.com/odoo/odoo/issues/1105

It is due to the web.base.url value which was different depending working from a place or another. then I just fixed it to the most common value and will have to forget working from some computers with tunneling. Check the details to fixed the value : https://bugs.launchpad.net/openobject-server/+bug/1295022