← Back to team overview

openerp-community team mailing list archive

Re: report_webkit future

 

Yes and no :) , Fabien Meghazi did it a few years ago, before joining openerp, the qweb template is awful but it works.

On 02/19/2014 02:17 PM, Alexandre Fayolle wrote:
Hello Anthony. I'll assume you were kidding about writing qweb based
xslx reports.

http://pythonhosted.org/openpyxl/ is a nice python library to handle
these files.

Alexandre

On 19/02/2014 12:49, Antony Lesuisse wrote:
Yes i forgot to mention that the new report module natively support
excel reports (or anything else, png, svg, odt...).

For an excel report you should define a controller that output the
file. For excel 97 you may use xlwt, for excel 2007 and above you
could use qweb with the bloated office xml format xlsx.

@http.route('/mymodule/report/mymodel_excel97_report1/<str:ids>',
type='http', auth="user")
def export_xls(self,ids):
     workbook = xlwt.Workbook()
     (...)
    response = request.make_response(None, headers=[('Content-Type',
'application/vnd.ms-excel'), ('Content-Disposition', 'attachment;
filename=table.xls;')])
    workbook.save(response.stream)
    return response

Then you define a 'qweb-pdf' report (yes we need to rename this into
'controller').

We will add an example in the report module.

On 02/19/2014 06:45 AM, Carlos Vásquez wrote:
Antony,

What about generating spreadsheets or text documents? Have you looked
for
something like wkhtmltopdf that is capable of generating a xls, doc,
ods or
odt from an html? Is it in your plans?

This could be, I think, the missing feature to ensure the community
is on
board with this change.

I really like the qweb report engine. You guys have done a great job.
We will
start migrating our main report set for the localization by the end
of March.
Do you have an idea of when will it be merged in trunk (more or
less)? This
can help to plan our work to prepare for v8.

Regards,
--
PS: escribí este email desde mi teléfono, por favor disculpe la
brevedad y
cualquier error de escritura.

Carlos Vásquez
CTO · Director de Ingeniería

carlos.vasquez@xxxxxxxxxxxxxxx <mailto:carlos.vasquez@xxxxxxxxxxxxxxx>
CR: +(506) 4000 CORP (4000 2677)
US: +1 (786) 472-4267
Cel: +(506) 8351 4484
skype: crvasquez
twitter: cvclearcorp

300 m. Este de la Escuela
Calle de Platanares
11402 San Jerónimo, Moravia
San José, Costa Rica

http://www.clearcorp.co.cr


_______________________________________________
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