Odoo Aide

0

0
2 Answers
2
Avatar

Shawn Varghese

--Shawn Varghese--
862
| 5 3 10
Dubai, Émirats Arabes Unis
--Shawn Varghese--


Shawn Varghese
18/10/2015 02:09

You could try using the existing paper definitions and make your own based on them. In the reports module, in the data directory, you can find the report_paperformat.xml .


<record id="paperformat_euro" model="report.paperformat">
<field name="name">European A4</field>
<field name="default" eval="True" />
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">40</field>
<field name="margin_bottom">23</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False" />
<field name="header_spacing">35</field>
<field name="dpi">90</field>
</record>


Maybe this could help.


1
Avatar

Jithin

--Jithin--

816
| 5 1 7
Calicut, Inde
--Jithin--



Jithin
15/09/2018 04:12

You can add custom paper format to a report like below


<report
    id="lukasz_orders_report_qweb"
    string="Drukuj Zgloszenie"
    model="lukasz.orders"
    report_type="qweb-pdf"
    name="your_module_name.lukasz_orders_report"
    file="your_module_name.lukasz_orders_report"
 />

<record id="paperformat_lowmargin" model="report.paperformat">
    <field name="name">European A4 low margin</field>
    <field name="default" eval="True" />
    <field name="format">A4</field>
    <field name="page_height">0</field>
    <field name="page_width">0</field>
    <field name="orientation">Portrait</field>
    <field name="margin_top">4</field>
    <field name="margin_bottom">4</field>
    <field name="margin_left">4</field>
    <field name="margin_right">4</field>
    <field name="header_line" eval="False" />
    <field name="header_spacing">0</field>
    <field name="dpi">90</field>
</record>

<record id="your_module_name.lukasz_orders_report_qweb" model="ir.actions.report.xml">
    <field name="paperformat_id" ref="your_module_name.paperformat_lowmargin" />
</record>
Poser une question
Writer
408
E.M.
Keep Informed
1 Abonné(e)s
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now