In Odoo-9 reports are written in HTML/QWeb, like all regular views in Odoo. You can use the usual QWeb control flow tools. The PDF rendering itself is performed by pdf.For example code is below.
report
id="account_invoices"
model="account.invoice"
string="Invoices"
report_type="qweb-pdf"
name="account.report_invoice"
file="account.report_invoice"
attachment_use="True"
attachment="(object.state in ('open','paid')) and
('INV'+(object.number or '').replace('/','')+'.pdf')"
Note- The paper format cannot currently be declared via the shortcut, it must be added afterwards using a extension on the report action itself.
0 Comment(s)