تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
6086 أدوات العرض

Hi,

I'm working on Odoo 14 , I want to display the header only on the first page and footer only on the last page , How can I do it ? Any help please?? Thanks.


    <template id="report_invoice_document_extend" inherit_id="account.report_invoice_document">

       <xpath expr="//t[@t-call='web.external_layout']" position="attributes">

            <attribute name="t-call">my_module.external_invoice_layout</attribute>

       </xpath>

    </template>

 

<template id="external_layout_standard">

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

       ...

    </div>


    <div t-attf-class="article o_report_layout_standard o_company_#{company.id}_layout"  t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id" t-att-data-oe-lang="o and o.env.context.get('lang')">

       ....

    </div>

</template>

       

<template id="external_invoice_layout">

    <t t-if="not o" t-set="o" t-value="doc"/>


    <t t-if="not company">

        <!-- Multicompany -->

        <t t-if="company_id">

            <t t-set="company" t-value="company_id"/>

        </t>

        <t t-elif="o and 'company_id' in o">

            <t t-set="company" t-value="o.company_id.sudo()"/>

        </t>

        <t t-else="else">

            <t t-set="company" t-value="res_company"/>

        </t>

    </t>

    <t t-call="my_module.external_layout_standard">

        <t t-raw="0"/>

    </t>

</template>

الصورة الرمزية
إهمال
أفضل إجابة

This module can help you to solve your problem.

Link: https://apps.odoo.com/apps/modules/14.0/report_qweb_element_page_visibility

الصورة الرمزية
إهمال
أفضل إجابة

Before each page, it calls a layout with footers and a header. Create a layout with empty header and footer. Another one with empty header and full footer

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أكتوبر 22
23771
2
سبتمبر 21
12462
1
أغسطس 21
8119
1
يوليو 21
4176
1
ديسمبر 23
28172