Contributors mailing list archives

Re: Aeroo replacement and text2text reporting engine

Alexinux, Alexis de Lattre
- 08/12/2016 09:52:02

2016-12-07 18:53 GMT+01:00 Holger Brunn <>:
> Do you know an equivalent module that supports txt  txt reports ? If
> not, I think it would be great to develop one in the OCA, don't you think ?

qweb. Most people are not aware that it's not limited to xml, you can
generate arbitrary text with it. See runbot for an example:

Thanks for this info, it's very interesting ! As far as I understand, qweb supports txt2txt reports, but this is not supported by the reporting engine of Odoo using the object, cf :
-  => report_type field only has "qweb-pdf" and "qweb-html"
- => in the method _get_report_from_name(), it also filters on "qweb-pdf" and "qweb-html"

But I confirm that simple text templating works with qweb ; I ported my module purchase_dilicom_csv using it :
but, compared to my v8 version with Aeroo, it needs extra work :
- add a button by inheriting the purchase.order form view
- add the python code corresponding to that button that calls the render method on the qweb template and create an attachement to allow the user to download the file (I don't know an easier way to throw a file to the user without going through a "real" report).

So maybe we would develop a small OCA module to add a "qweb-txt" as an additionnal report_type and have support for it in Do you think it would be possible ? easy to do ?

Alexis de Lattre
Akretion France - 35B rue Montgolfier - 69100 Villeurbanne - France
Mail :