Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profit organisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Missing headers in webkit/mako report PDFs

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
webkitmakoreports
3 Antwoorden
12095 Weergaven
Avatar
Timo Talvitie, Vizucom Oy

Hello, I'm having a bit of a problem with the webkit reports. When creating the report PDF, the contents show up fine, but the header is missing (just an empty white area fills top of the page).

What makes this interesting is that when I view the HTML version of the report (by switching on the developer mode and going to Settings -> Technical -> Actions -> Reports and enabling the debug mode for the report), the header is visible. So there is some kind of issue that happens when doing the PDF conversion.

The same problem occurs both when viewing a webkit report in my own module and in the sale_order_webkit module. The base_headers_webkit module has been installed, and the wkhtmltopdf library as well

The report is invoked like this:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<report id="sale.report_sale_order"
        name="sale.order.webkit"
        auto="False"
        model="sale.order"
        file="sale_order_webkit/report/sale_order.mako"
        string="Quotation - Order"
        webkit_header="base_headers_webkit.base_reports_portrait_header"
        report_type="webkit"/>
</data>
</openerp>

Anyone encountered similar issues? The webkit_header attribute should be valid since it does not throw a ValueError.

1
Avatar
Annuleer
yann

Hi ! I've the same issue. What do you mean by "The report is invoked like this:", and where is the report.py file ? The code of Ghanshyam Prajapati have fixed this ? Thanks :)

Timo Talvitie, Vizucom Oy
Auteur

Hi, the problem remains also after trying Ghanshyam's suggestions. I'm beginning to think the issue has something to do with my installation or server config, not the python/xml code itself, because for me, the header is missing also in Camptocamp's sale_order_webkit module, and the module apparently works just fine for other people. I will post here what I find when I get the chance to look into the issue in more detail.

Avatar
Arthur Vuillard
Beste antwoord

I've met the same problem. In fact, I was using wkhtmltopdf 0.9.9. An update to 0.11.0 RC1 made it run correctly : both headers and footers !

6
Avatar
Annuleer
Timo Talvitie, Vizucom Oy
Auteur

This did the trick! Many thanks, the version I had pulled with apt-get was indeed 0.9.9, and 0.11.0 RC1 seems to work flawlessly. Just a note to anyone who might have the same problem: when you download the wkhtmltopdf tarball, after extracting it you will also need to tell OpenErp where it can find the executable. This is done from settings -> parameters -> system parameters. Add a new line with "webkit_path" as key, and the executable location as value.

Alexandre Boily

It still doesn't work for me. I tried 0.9.9, 0.11.0 RC1, and 0.11.2, and my headers are still blank. The module of interest is sale_order_webkit from Serpent CS, and a few custom reports I created. All exhibit the same behaviour. Playing with paper sizes and margins work, but the content remains empty.

Avatar
Ghanshyam Prajapati
Beste antwoord

Try Following code,

    <record id="sale.report_sale_order" model="ir.actions.report.xml">
        <field name="report_type">webkit</field>
        <field name="report_name">sale.order.webkit</field>
        <field eval="0" name="multi"/>
        <field eval="0" name="auto"/>
        <field eval="1" name="header"/>
        <field eval="1" name="menu"/>
        <field name="model">sale.order</field>
        <field name="type">ir.actions.report.xml</field>
        <field name="name">Quotation - Order</field>
        <field name="report_rml">sale_order_webkit/report/sale_order.mako</field>
        <field name="report_file">sale_order_webkit/report/sale_order.mako</field>
        <field name="webkit_header" ref="base_headers_webkit.base_reports_portrait_header"/>
    </record>

and in your report.py file,

report_sxw.report_sxw('report.sale.order.webkit', 'sale.order', 'sale_order_webkit/report/sale_order.mako', parser=sale_order_webkit_report, header="external")

Hope it work for you,

1
Avatar
Annuleer
Timo Talvitie, Vizucom Oy
Auteur

Thank you for the reply, but the problem seems to be the same also with this code, i.e. the HTML headers work fine but the PDF headers do not.

Ghanshyam Prajapati

PDF headers means..???

Timo Talvitie, Vizucom Oy
Auteur

I mean the header (company name, email, phone etc) is visible in the HTML output produced by the debug mode, but not visible in the PDF output.

Ghanshyam Prajapati

Please see my updated answer.

Avatar
Anand
Beste antwoord

Me too faced the problem... 

Just and upgrade and changing the path is system parameter works good for me...

try it,...

1
Avatar
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Retrieving all records from a table with mako templates
webkit mako reports
Avatar
0
mrt. 15
5027
Images in webkit / mako pdf reports Opgelost
webkit mako
Avatar
Avatar
Avatar
Avatar
4
sep. 16
9090
how to use dynamic file name for webkit report?
webkit reports
Avatar
0
mrt. 15
3854
How do I limit an iteration in Mako?
webkit mako
Avatar
Avatar
1
mrt. 15
5834
how to use dynamic file name for webkit report?
webkit reports
Avatar
0
mrt. 15
4565
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now