← Back to team overview

openerp-community team mailing list archive

Re: report_webkit future

 

I would like to add that the new report engine is ONLY an addons, not a single server nor weblcient line were touched ! [1]

It means that anyone should be able to do any report engine as a pure addons without touching anything in the server.

Our intention is not to close the door to any other kind of report engine, it's just to standardise our core addons a single templating engine (used both for web and print) and a coherent report system.

Alternative (or specialised) reporting engines are always welcome on apps.

[1] We only only cleaned the res_company views for usability, and renamed paper_format to rml_paper_format to prepare for the deprecation.

On 02/19/2014 01:45 AM, Antony Lesuisse wrote:
definitions:

- "server/report" is the rml egine with it's funny [[ syntax ]] 6460 line of code
- "report_webkit" is the c2c jinja2 report engine 611 line of code
- "report" is the new v8 qweb-based report engine 497 line of code

Here is my plan:

v8:

we keep "server/report" and "report_webkit" unchanged, but every report in our
addons are converted to qweb.

v9:

we remove "server/report" and "report_webkit" from our repository,
"report_webkit" will be moved to a community repo (like we do for every
deprecated module).

So you should adapt your "report_webkit" reports to the new "report" engine,
the main difference is to use qweb templating instead of jinja2. The principal
advantage of using qweb instead of jinja2 is the modularity (like forms
views). Qweb directives are xml-attributes (only 7 attributes that you need to
learn) so a qweb template is easily extensible using the built in xpath
extention mecanism of openerp (exactly like form views).

In pratice you can now easily extend sale order lines, adding or removing a
field, change the style, ... Reports in openerp was the ONLY non-modular
component, it's a huge leap forward.

OpenERP Enterprise customer can ask our migration services to convert their
report for a very small fee (part of our custom code migration option).

Converting a "report_webkit" report to a "report" is very easy the code doesnt
change, you only need to adapt the template from one syntax to an other one. I
think it could almost be automated.

An other interresting change is that report are now REST as every report has
an url like:

/report/<reportname>/<ids>

and options can be provided

/report/<reportname>/<ids>?option1=value1

the above controller output the html version of the report, for the pdf
version you can use

/report/pdf/<reportname>/<ids>

This controller simply loads the first one and pass it trough wkhtml2pdf and
returns the pdf.

Please TEST it before commenting, the branch is trunk-qweb-report2, and
trunk-qweb-report.

I would like to thank c2c for the "report_webkit" module as it really paved
the way to the switch from RML to HTML/CSS, and to the quick generation of pdf
using wkhtmltopdf. We keep those feature in "report". We unifed openerp
template engine into qweb an xml-friendly-extensible template engine (and
therefore modular like the rest of openerp) that is now used everywhere.

On 02/18/2014 09:27 AM, Nicolas Bessi wrote:
Dear community,

With the approaching release of V8, I'm starting to have questions about the
future of the Webkit reports.


*QWeb and Webkit*
*
*
First of all there seems to be a lot of confusions between QWeb reports and
Webkit reports.

Qweb reports and Webkit reports are separated reports engines even if they
both rely on similar concept.

They both allows you to develop at set of report using an HTML based template
language.
But they have some major differences.

AFAIK Qweb reports are view based reports that offer the same flexibility than
standards OpenERP views, (inherit, groups, xpath, translation, etc).

Webkit reports rely on an external library (wkhtmltopdf) to generate PDF from
HTML.
HTML are generated using mako/jinga templates. Webkit reports were created to
desing complex layout (like ESR payment slip) and render huge report
(thousands of pages) without needed a huge machinery.

My opinion is that both report engine are complementary at that time.


*Future of Webkit reports*

I have not heard that report_webkit will be deprecated and there are still in
code base.
Camptocamp will continue to maintain existing webkit reports (especially
financial report) but may port to Qweb report that are a better fit for this
technology (PO, SO, etc.)

We will also continue to provide enhancement and support to report_webkit for
next the release.


That said it is not impossible at middle term when we have more feedback on
Qweb report to have convergence of both engines.


Regards

Nicolas


_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


Follow ups

References