Odoo Help

Welcome!

This community 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.

2

Slow creation of reports with Qweb in PDF - Odoo 8

By
Maxime Deuse
on 11/3/14, 5:23 PM 4,242 views

Hi,

I have been creating some labels in pdf with Odoo 8. Sadly it's a very slow process; when I create 150 labels it takes about 1 minute to compute the PDF file (html file goes significantly faster 2-3 seconds). I think the cause of this slowness is the interaction between Qweb and wkhtmltopdf? Does anyone know a workaround to make this much faster?

My report code is the following:

    <template id="report_batch_view_zebra">
        <t t-call="report.html_container">
            <t t-foreach="docs" t-as="doc">
                <t t-foreach="doc.number_items" t-as="i">
                    <div class="page">
                        <h2 t-field="doc.variety_id"/>
                        <h2 t-field="doc.plot_id"/>
                        <p>date : <span t-field="doc.picking_date"/></p>
                    </div>
                </t>
            </t>
        </t> 

 

PS: Note that my solution is currently working on Django and I am trying to port it to OpenERP to get it integrating with the OpenERP apps. With Django I was using reportlab (canvas from reportlab.pdfgen) and it went much faster to generate the pdf (less than a second).  If i can't get it anyfaster with Qweb would it be a good solution to import reportlab and use this?

 

2
Anand
On 1/9/15, 12:35 AM

I think qweb is something unreliable...

I used it for barcode printing... It tooks terrible time to print 300 barcodes,,, but rml takes a minute of time....

so better use rml, webkit for enormous prints...

qweb for some less printing..

2
Daniel Keller
On 1/8/15, 12:55 PM

I have a similar issue. PDF creation is very slow, plus it is missing all the formating.

I find the issue discussed here:
https://github.com/odoo/odoo/issues/1105

However, none of the hints there did help me so far.

Have you tried setting the report.url to http://0.0.0.0:8069/ under system parameters? this should fix your problem.

Yenthe
on 1/9/15, 2:01 AM
Thanks! I did set it now to http://127.0.0.1:8069 and that solved the problem. I first tried with the external URL, what didn't work.

I have the service running behind an apache reverse proxy, that requires client certificates for authentication.

2015-01-09 8:01 GMT+01:00 Yenthe <yenthespam@gmail.com>:

Have you tried setting the report.url to http://0.0.0.0:8069/ under system parameters? this should fix your problem.

--
Yenthe
Sent by Odoo S.A. using Odoo about Forum Post False

Daniel Keller
on 1/12/15, 3:28 AM

Thank you Yenthe, it solved the problem for me. It was strange as the formatting was randomly on or off.

Gabriel
on 2/6/15, 7:11 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 11/3/14, 5:23 PM
Seen: 4242 times
Last updated: 3/16/15, 8:10 AM