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

not having any custom header or footer.
just calling web.external layout.
Not getting the correct page number and when i print the Pdf ,The company logo's top is disappearing

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <report
            id="quote_so"
            string="Quote/so"
            model="sale.order"
            report_type="qweb-html"
            file="test_report.quoteso_report"
            name="test_report.quoteso_report"

     />
  
    <template id="quote_documentss">
   
        <t t-call="web.external_layout">
   
        <div class="page">

            <div align="right">
                <p align="right" padding-left="50px">
                    <b>
                        <h3><span t-field="doc.state"/>:
                            <span t-field="doc.name"/>
                        </h3>
                    </b>
                </p>
            </div>
           


        </div>
        </t>
        <!--<p style="page-break-before: always"></p>-->
    </template>
    <template id="quoteso_report">
        <t t-call="web.html_container">
            <t t-foreach="docs" t-as="doc">
                <t t-call="test_report.quote_documentss"/>
            </t>
        </t>
    </template>
</odoo>

Ảnh đại diện
Huỷ bỏ

Its looks like you have done something wrong in code so this template is not loading properly. Please share your code.

Tác giả

please see my code

Câu trả lời hay nhất

Hi, 

This problem occurs if you change the paper format. so if you change it then try to adjust width and height.

If not then you can use your own custom header and footer by creating templates and calling it in your template.

You can refer the code of external_layout and internal_layout templates from report_templates.xml file in web module.







Ảnh đại diện
Huỷ bỏ