Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4802 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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
Abbandona

Thanks alot... Works perfectly

Post correlati Risposte Visualizzazioni Attività
1
apr 23
1757
1
mar 22
3448
5
lug 25
2163
2
mar 24
2701
0
nov 22
2907