Technical mailing list archives

Re: Pdf generation question

Kobus Wolvaardt
- 01/27/2015 14:21:43

Awesome, thanks!

On 27 Jan 2015 9:17 PM, "André P." <> wrote:

2015-01-27 18:17 GMT+00:00 Kobus Wolvaardt <>

Any suggestions on where to start with the pdf? I am finding very little on the topic in the docs. There is a quote and invoice generation pdf system but I am not finding much on it.

The PDFs are generated by the reporting engine. In v8, the recommended system is QWeb. Here's the docs:

I read through this, but I am missing something. There is no link to how to actually do the layout, nor to what that module will be called. It references report = report_obj._get_report_from_name('<<module.reportname>>') and then renders it. How do I change the layout? Would there be a sample somewhere to look at?

A report isn't a model, it's a kind of view of another model (the one with the info you're trying to show).

In v8 using QWeb, you just need to create an XML file with the report layout, and then declare that report using a <report> tag. Then a new entry in the Print menu will appear on that object. For an example, see the 'product' addon, specifically in views/report_pricelist.xml and product_report.xml.


André Paramés


Miraflores Office Center,

Avenida das Túlipas, nº 6,

13ºA/B 1495-161 Algés


m. +351 960 029 663

t. +351 214 123 492

f. +351 214 123 493

O conteúdo desta mensagem de correio electrónico e seus anexos é confidencial e de uso reservado. Se não é o destinatário apague-a e informe o remetente. Esta mensagem é verificada pelo nosso sistema de anti-vírus, ainda assim não aceitamos qualquer responsabilidade por danos causados por vírus que possam estar contidos nesta mensagem. Para mais informações visite-nos em

 Não imprima este email caso não seja estritamente necessário. A Terra agradece-lhe!

Post to: