Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
4789 Ansichten

I need to be able to programmatically (using python), run one of the invoice reports and save it as an attachment of some other record.

All previous versions' examples don't seem to be working now.


Anyone has a working example for this?

(a way to save the report into a pdf would suffise)

Thanks!

Avatar
Verwerfen
Autor Beste Antwort

Another Odoo version, another little change in code.


# run the report and get its content

data, data_format = self.env.ref('account.account_invoices_without_payment')\                                     .sudo()._render_qweb_pdf([origin.id])



Avatar
Verwerfen

Thanks alot... Works perfectly

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Apr. 23
1747
1
März 22
3446
5
Juli 25
2161
2
März 24
2697
0
Nov. 22
2902