Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
14558 มุมมอง

Hello I need change the orientation of the report on qweb-pdf. I am following the documentation making a record, but I don't understand why is this ignored. Here is the XML

     <report
        id="report_asiento_contable"
        model="account.move"
        string="Asiento contable"
        name="velfasa.report_asiento_contable_view"
        file="velfasa.report_asiento_contable"
        report_type="qweb-pdf" />
    <template id="report_asiento_contable_view">
        <xpath expr="//style" position="after">
            <style type="text/css" >
                .tabla {
                    cellpadding: 10;
                    border: 1px solid black;
                }
            </style>
        </xpath>
        <t t-call="report.html_container">
            <record id="paperformat_asiento_contable" model="report_asiento_contable.paperformat">
                    <field name="name" >Asiento contable</field>
                   <field name="orientation" >Landscape</field>
            </record>

       </t>

  </template

อวตาร
ละทิ้ง

Thanks, this is the solution.

คำตอบที่ดีที่สุด

Try this:

<report
        id="report_asiento_contable"
        model="account.move"
        string="Asiento contable"
        name="velfasa.report_asiento_contable_view"
        file="velfasa.report_asiento_contable"
        report_type="qweb-pdf" />
        
<template id="report_asiento_contable_view">
        <xpath expr="//style" position="after">
            <style type="text/css" >
                .tabla {
                    cellpadding: 10;
                    border: 1px solid black;
                }
            </style>
        </xpath>
</template>

<record id="paperformat_asiento_contable" model="report.paperformat">
       <field name="name">Asiento contable</field>
       <field name="orientation">Landscape</field>
</record>

<record id="report_asiento_contable" model="ir.actions.report.xml">
    <field name="paperformat_id" ref="paperformat_asiento_contable"/>
</record>   

 

probably you also need: <template id="report_asiento_contable_view" inherit_id="report.XXXXXXXX">

hope this help.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ธ.ค. 15
4511
3
มี.ค. 15
18169
0
มี.ค. 15
3584
Inherit Qweb แก้ไขแล้ว
4
ก.พ. 24
48684
How do you use variables in a Qweb loop? แก้ไขแล้ว
11
เม.ย. 23
93352