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

Hi guys,

I want to modify header and footer for external report layout with format European A4

view image https://imgur.com/yJyfS0o

아바타
취소

I did this exact same thing, if you still need to you can go to the drop down option -Change Footer and with Xpath replace the current footer and header with the values that you want, this way you can leave the original header and footer untouched.

Just paste this inside the <data> tag and add whatever you want

<xpath expr="//div[contains(@t-attf-class, 'header')]" position="replace">

        <div t-attf-class="header o_company_#{company.id}_layout">

            <!-- CUSTOM HEADER HERE -->    

        </div>

    </xpath>

    <xpath expr="//div[contains(@t-attf-class, 'footer')]" position="replace">

        <div  t-attf-class="footer o_standard_footer o_company_#{company.id}_layout" >

          <!-- CUSTOM FOOTER HERE -->

        </div>

    </xpath>

베스트 답변

Hello, you can use:


<template id="external_layout_header" inherit_id="report.external_layout_header">
<xpath expr="//div[1]" position="replace">........<xpath/>

<template/>


아바타
취소
베스트 답변

For future developer (including me). There is no external_layout_header​ in odoo 16. Actually you can check the report xml template in odoo-server\addons\web\views\report_template.xml​.  There you can see which id that giving the pdf a header, a footer, etc

아바타
취소
관련 게시물 답글 화면 활동
2
12월 17
3134
5
12월 19
10187
4
10월 18
4276
4
8월 18
6284
4
6월 18
4478