Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2885 Lượt xem

My objective is to create a report with a cover page without a logo using the basic_layout, and to apply the external_layout on the other pages.
Problem: When I use both layouts in the same document, external_layout is mistakenly applied to the first page instead of basic_layout.

<template id="report_saleorder_document">
    <t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)" />

 
  <!-- cover page -->
    <t t-call="web.basic_layout">
       <div class="cover_page" style="page-break-after:always;">
           <div class="row">
               <div class="col-12">
                   <h1>COVER PAGE</h1>
               </div>
          </div>
       </div>
    </t>

    <t t-call="web.external_layout">
        <div class="page">
            <!-- Other pages ... -->
        </div>
    </t>
</template>


My current solution is to use external_layout for the entire report and add a style to the cover_page div to hide unwanted elements using the "report_qweb_element_page_visibility" module class. Although it does the job, I believe there might be a more elegant solution. I would appreciate your suggestions. Thank you in advance.




Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 25
1035
2
thg 3 25
1166
4
thg 11 24
6920
1
thg 3 24
1857
3
thg 9 23
24601