콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
7848 화면

Hi,

I have changed my code, so that the header will only be displayed at the first page.

But now, I'm facing another issue, that the header & footer are gone on all pages, but on the preview I can see the header and also an part of the footer (it's kind of cropped - idk), but when I download the invoice, there is no footer and also no header anymore, they are just gone.

It's regarding Odoo V12 with Ubuntu 18.04.2 LTS

What I have tried so far:

  • checked the report.url inside the system parameters --> http://127.0.0.1:8069 is used

  • uninstalled the wkhtmltopdf and re-installed it (`wkhtmltopdf --version` is displaying `wkhtmltopdf 0.12.5 (with patched qt)`)

My template source-code:

<?xml version="1.0"?>
<t t-name="l10n_de.external_layout_din5008">
<t t-if="not o and doc">
<t t-set="o" t-value="doc"/>
</t>
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id.sudo()"/>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"/>
</t>
<t t-call="web.basic_layout">
<t t-set="o" t-value="o.with_context(lang=o.partner_id.lang)"/>
<div class="page">
<div class="header">
<img t-if="company.logo" t-att-src="image_data_uri(company.logo)" class="float-left" style="margin-left:95px !important; max-height:75px !important;"/>
</div>
</div>
</t>
<div class="article din" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id">
<t t-raw="0"/>
</div>
<div class="footer o_background_footer din" style="position:absolute !important; left:0mm !important; right:0mm !important; width:100% !important; height:542mm !important; background-color:#0870b0 !important; bottom:auto !important;">
<div style="height:20px !important; width:100%;">
</div>
<div style="color:white; margin-left:95px; width:auto; height:auto; font-family:Arial !important; font-size:0.8em !important; float:left !important;">
                     SOME TEXT HERE
                  </div>
<div style="color:white; margin-left:65px; width:auto; height:auto; font-family:Arial !important; font-size:0.8em !important; float:left !important;">
                    SOME TEXT HERE 
                  </div>
<div style="color:white; margin-left:65px; width:auto; height:auto; font-family:Arial !important; font-size:0.8em !important; float:left !important;">
                    SOME TEXT HERE
                    Page <span class="page"/>/<span class="topage"/>
</div>
</div>
</t>
아바타
취소

I have been searching for hours..... installed 4 different versions of wkhtmltopdf. Dev mode was the problem all along fml

Thank you Eduardo

Have you tried deactivating the developer mode and trying out to print the pdf report as a "normal user"?

베스트 답변

No way! I had the same issue and deactivating developer mode fixed it! Thanks a lot!

아바타
취소
베스트 답변

Thank you so much! I tried so much stuff and this was the solution. 

아바타
취소
관련 게시물 답글 화면 활동
2
5월 24
2754
1
6월 23
2816
2
8월 20
9880
1
12월 23
2241
0
11월 20
4308