Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4652 Vizualizări

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!

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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])



Imagine profil
Abandonează

Thanks alot... Works perfectly

Related Posts Răspunsuri Vizualizări Activitate
1
apr. 23
1648
1
mar. 22
3343
PDF reports Rezolvat
5
iul. 25
2005
2
mar. 24
2540
0
nov. 22
2770