Odoo Help

3

3
14 Answers
6
Avatar

Yenthe Van Ginneken Belgium

--Yenthe Van Ginneken--
25150
| 9 9 12
Turnhout, Belgium
--Yenthe Van Ginneken--


Yenthe Van Ginneken Belgium
10/13/14, 1:59 AM

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.

5 Comments
devza Poland
10/13/14, 4:33 AM

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

Oocademy, Yenthe Van Ginneken Belgium
10/13/14, 5:45 AM

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. :)

devza Poland
10/13/14, 5:49 AM

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

Oocademy, Yenthe Van Ginneken Belgium
10/13/14, 5:52 AM

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.

devza Poland
10/13/14, 5:55 AM

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

3
Robin Chatfield Sweden
7/30/15, 9:26 AM

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/).

1 Comment
Oocademy, Yenthe Van Ginneken Belgium
7/30/15, 9:31 AM

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 ;)

0
legland France
1/16/19, 10:16 AM

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 ...)

0
thompsonn Russian Federation
3/23/17, 1:04 AM

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

-1
Jim Tambling United Kingdom
2/12/17, 6:01 AM

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 Comment
Rui Andrada Brazil
2/12/17, 12:35 PM

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

Ask a Question
Writer
Keep Informed
3 follower(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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now