Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Consulting
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

wkhtmltopdf report generation problem - report is generated incorrectly

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
6 Replies
24295 Rodiniai
Portretas
Tobi

Hi all, I have a wierd problem. On my vps I've installed Odoo and on clear db with just a sale module report is generated correct. But when I've installed more addons, added some product, created website w/ shop etc. (normal using of odoo) the report ist genereted incorrectly. Here is an example:

http://pl.rghost.net/58485634

So it looks like wkhtmltopdf problem, but I've got 0.12.1 version and as I said on a new db report is generated correctly. Any ideas what might be wrong? Also on my local pc Odoo prints reports always correctly. So maybe it's problem with VPS?

6
Portretas
Atmesti
Rui Andrada

I think you could add more information about your problem... I have some problem with report generation, but in my case I have some empty sale orders. I'm searching for a solution, if I find any useful information for you I'll post here.

Rui Andrada

Maybe it's help you: https://github.com/odoo/odoo/issues/364#issuecomment-47309589 https://www.odoo.com/forum/help-1/question/openerp-v8-wkhtmltopdf-0-12-0-error-bug-52041

Portretas
Yenthe Van Ginneken (Mainframe Monkey)
Best Answer

This is a VPS/networking problem that I also had. Is your PDF delayed (taking more time then normal) and is your shop slow when clicking on pay now?
Your problem is coming from the Odoo itself. It cannot find the correct routing to its CSS resources etc and this causes a delay.
The problem is easy to fix..
Go to settings > Parameters > System parameters and edit your web.base.url to have the value http://0.0.0.0:8069/
Now create a new parameter with the name web.base.url.freeze and as value True.

Reload your whole Odoo and you will see the problem is fixed.

14
Portretas
Atmesti
Tobi
Autorius

Great, it works now. Thank you. But if a delay is obvious, I wonder why the PDF file was corrupted? Anyway, thanks for help.

Yenthe Van Ginneken (Mainframe Monkey)

No problem. The delay is caused because your Odoo serer is looking for the resources but can not find them. Because of not finding this CSS & resources you get a corrupted view, what really is a document with no styling to it. Please upvote or mark my answer as valid if this helped you. :)

Tobi
Autorius

It's sad but I have no karma to upvote your answer :(

Yenthe Van Ginneken (Mainframe Monkey)

Now you do! The karma system is very annoying in the first posts. I've upvoted your question since I'm sure more people will run into this anyways. You should now be able to accept/upvote it.

Tobi
Autorius

Yup, so I did. I hope that your answer will help anyone who's facing same problem as mine.

Nikita Gautam

I tried this but it is still not working:(

Portretas
Robin Chatfield
Best Answer

Resurrecting this post because it was the first hit on google.

Yenthe's answer works, but it will break a lot of other features. A fix to this issue was added shortly after this question was asked. The correct solution to this problem is to add a parameter named report.url with the address that the report module should use (probably http://0.0.0.0:8069/).

5
Portretas
Atmesti
Yenthe Van Ginneken (Mainframe Monkey)

Upvoted because this is absolutely true! I've lost track of this post otherwise I would've updated it. I won't edit my answer since you posted this though. Thanks for the heads up ;)

Portretas
legland
Best Answer

PDF generation too long and faulty on Odoo12 - solution!
1) Go to the Backend part of your Odoo12 and activate the developer mode.
2) Go to the "Configuration" section. Then the "Technical" tab and click on "System Settings" at the bottom of the drop-down menu.
3) Click on the "Create" button
4) In the "Key" field, put "report.url" and in the "Value" field, "http://0.0.0.0:8069". Then save.
5) Re-click the "Create" button
6) In the "Key" field, put "web.base.url.freeze" and in the "Value" field, "True". Then save.
7) Go to the terminal of your Odoo 12 server
8) Start this command "service odoo restart"
9) Test the PDF generation of Odoo 12. (by printing an article, an estimate or an invoice ...)

1
Portretas
Atmesti
Portretas
Matija
Best Answer

In my case I had to is change report.url to main database URL - with web.base.url and web.base.url.freeze 

0
Portretas
Atmesti
Portretas
thompsonn
Best Answer

As Robin Chatfield noticed Yenthe's fix will break a lot of features, e.g. e-mail recipients will get broken links with the wrong base. I've tried to add the report.url parameter using v. 10.0 but still faced problems with website_sale reports renderings that customers receive after finishing a purchase because the corresponding default method was seeking CSS at the wrong path. So I left the created 'report.url' system parameter and overrode the built-in method like this:

from odoo import models, fields, api
from odoo.http import request
import time

class ReportGenerationFix(models.Model):
_inherit = 'report'

@api.multi
def render(self, template, values=None):
if values is None:
values = {}

context = dict(self.env.context, inherit_branding=True)
user = self.env['res.users'].browse(self.env.uid)
website = None
if request and hasattr(request, 'website'):
if request.website is not None:
website = request.website
context = dict(context, translatable=context.get('lang') != request.website.default_lang_code)

view_obj = self.env['ir.ui.view'].with_context(context)
values.update(
time=time,
context_timestamp=lambda t: fields.Datetime.context_timestamp(self.with_context(tz=user.tz), t),
editable=True,
user=user,
res_company=user.company_id,
website=website,
web_base_url=self.env['ir.config_parameter'].get_param('report.url', default='')
)
return view_obj.render_template(template, values)


Thanks

0
Portretas
Atmesti
Portretas
Jim Tambling
Best Answer

I am using Odoo 10 and report generation either takes a long time or just fails. Is there a patch I need to apply or a setting I need to change?


Regards

Jim

-1
Portretas
Atmesti
Rui Andrada

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.

https://www.odoo.com/forum/help-1/faq

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registracija
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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