logo
down
shadow

Odoo bigger header/footer in qweb pdf reports


Odoo bigger header/footer in qweb pdf reports

Content Index :

Odoo bigger header/footer in qweb pdf reports
Tag : pdf , By : John Phipps
Date : December 18 2020, 12:00 PM

I wish did fix the issue. if you set paper format in technical setting it will affect other report which used for european A4 or anything which is predefined instead try to give your own custom paper format
<odoo>
<record id="report.paperformat_us" model="report.paperformat">
    <field name="name">US Letter</field>
    <field name="default" eval="True"/>
    <field name="format">Letter</field>
    <field name="page_height">0</field>
    <field name="page_width">0</field>
    <field name="orientation">Portrait</field>
    <field name="margin_top">30</field>
    <field name="margin_bottom">40</field>
    <field name="margin_left">7</field>
    <field name="margin_right">7</field>
    <field name="header_line" eval="False"/>
    <field name="header_spacing">40</field>
    <field name="dpi">90</field>
</record></odoo>

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

odoo / OpenERP V8 - Tutorial on QWeb Reports


Tag : development , By : TC.
Date : March 29 2020, 07:55 AM
I hope this helps . After searching around I've come to this solution. I've translated all the menu headers from German, because I'm using Odoo in German.
reports are listed in Settings / Reporting / Reports you can click one of the reports if you edit one of the reports you can click on "Search for linked QWeb Views" - you can click and change these views. They are in HTML and are used for the data in the reports

Set font to whole Page in Odoo Qweb Reports


Tag : development , By : Sharad
Date : March 29 2020, 07:55 AM
will be helpful for those in need How can I set the Font in Odoo Qweb Reports? Currently, when I develop a report in ubuntu 12.04, PDF copy of report looks good. But, same thing if I try in ubuntu 14.04, font looks very small. How to over come it? , Try like this,
<div class="page" style="font-size: 18pt;font-family:Helvetica,Verdana,Arial,sans,Lucida Grande,Calibri;">

Tag : xml , By : quasarkitten
Date : March 29 2020, 07:55 AM
I hope this helps . Option 1: Modifying Existent Templates
You can modify the original footer and header views directly:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <template id="external_layout_header" inherit_id="report.external_layout_header">
        <!-- make here your template modifications as usual -->
    </template>

    <template id="external_layout_footer" inherit_id="account.external_layout_footer">
        <!-- make here your template modifications as usual -->
    </template>
</odoo>
<template id="external_layout_footer">
    <div class="footer">
        <div class="text-center" style="border-top: 1px solid black;">
            <ul t-if="not company.custom_footer" class="list-inline">
                <t t-set="company" t-value="company.sudo()"/>
                <li t-if="company.phone">Phone: <span t-field="company.phone"/></li>

                <li t-if="company.fax and company.phone">&amp;bull;</li>
                <li t-if="company.fax">Fax: <span t-field="company.fax"/></li>

                <li t-if="company.email and company.fax or company.email and company.phone">&amp;bull;</li>
                <li t-if="company.email">Email: <span t-field="company.email"/></li>

                <li t-if="company.website and company.email or company.website and company.fax or company.website and company.phone">&amp;bull;</li>
                <li t-if="company.website">Website: <span t-field="company.website"/></li>
            </ul>

            <ul t-if="not company.custom_footer" class="list-inline" name="financial_infos">
                <li t-if="company.vat">TIN: <span t-field="company.vat"/></li>
            </ul>

            <t t-if="company.custom_footer">
                <span t-raw="company.rml_footer"/>
            </t>

            <ul class="list-inline">
                <li>Page:</li>
                <li><span class="page"/></li>
                <li>/</li>
                <li><span class="topage"/></li>
            </ul>
        </div>
    </div>      
</template>
<template id="external_layout_header">
    <div class="header">
        <div class="row">
            <div class="col-xs-3">
                <img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 45px;"/>
            </div>
            <div class="col-xs-9 text-right" style="margin-top:20px;" t-field="company.rml_header1"/>
        </div>
        <div class="row zero_min_height">
            <div class="col-xs-12">
                <div style="border-bottom: 1px solid black;"></div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-6" name="company_address">
                <span t-field="company.partner_id"
                    t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
                    style="border-bottom: 1px solid black; display:inline-block;"/>
            </div>
        </div>
    </div>
</template>
<t t-if="'model_name' in o and o.model_name == 'account_invoice'">
    <!-- your custom footer or hedaer for invoices -->
</t>
<!-- ORIGINAL -->

<template id="external_layout">
    <!-- Multicompany -->
    <t t-if="not o and doc">
        <t t-set="o" t-value="doc"/>
    </t>
    <t t-if="o and 'company_id' in o">
        <t t-set="company" t-value="o.company_id"></t>
    </t>
    <t t-if="not o or not 'company_id' in o">
        <t t-set="company" t-value="res_company"></t>
    </t>

    <t t-call="report.external_layout_header" />
    <t t-raw="0" />
    <t t-call="report.external_layout_footer" />
</template>

<!-- CUSTOM -->

<template id="custom_external_layout">
    <!-- Multicompany -->
    <t t-if="not o and doc">
        <t t-set="o" t-value="doc"/>
    </t>
    <t t-if="o and 'company_id' in o">
        <t t-set="company" t-value="o.company_id"></t>
    </t>
    <t t-if="not o or not 'company_id' in o">
        <t t-set="company" t-value="res_company"></t>
    </t>

    <t t-call="my_module.custom_external_layout_header" />
    <t t-raw="0" />
    <t t-call="my_module.custom_external_layout_footer" />
</template>
<template id="your_report_document">
    <t t-call="my_module.custom_external_layout">
        <div class="page">

            <!-- your report content -->

        </div>
    </t>
</template>

Report formatting not working in Odoo 8 Qweb Reports


Tag : development , By : Ian
Date : March 29 2020, 07:55 AM

How to customize reports in Odoo 11 in Qweb? How to send data from other model to the qweb report?


Tag : development , By : Santhanam
Date : March 29 2020, 07:55 AM
I wish this help you In v11, report module has been removed along with report object. For this reason, you are facing this error. You have to remove the report from depends as it is added / merged in base module. You can check it here.
You can call your report using report_action method as follow:
self.env.ref('your_report_name').report_action(self, data=data)
Related Posts Related QUESTIONS :
  • Ghostscript to PDF invalid character
  • Attachment not being sent with email - GScript
  • Render HTML or GSP as a PDF and save it on server
  • Convert PDF to CMYK but ignore black?
  • ghostscript cmyk export yields wrong black
  • IBM Watson - Retrieve and Rank: How to tell that a text in a PDF document should be considered a field?
  • Win32: displaying PDF
  • itextsharp split shared xObject streams
  • Problem with size of lower indexed letters like: j,p,q,g etc. inside PDF files
  • Problem with PDF format in Crystal Report
  • Haskell: parsing PDF
  • How do I display PDFs in browsers without Acrobat plugin
  • Open a PDF with a word highlighted according to a link clicked on an HTML page
  • Missing presentation forms (glyphs) of some arabic characters in Unicode
  • Convert content stream of graphical text (consisting of `q` and `Q`) to proper content stream
  • Downloading PDF file on my test for further upload
  • What "font type" are the 14 standard PDF fonts?
  • PDF: obfuscating text encoding to prevent automatic parsing and copy+paste
  • Generating PDF from scratch, how are glyphs mapped to character codes?
  • Apache PDFBox - no fields?
  • Incorrect offset in cross reference table in pdf
  • What does PDF Version 1.x refer to?
  • Netsuite Invoice Pdf Show Amount Applied
  • iText 7 need to skip reading page header elements
  • pdf tounicode maps cid to incorrect character
  • Soure PDF Code Edited and it is nor Visible
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com