İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4847 Görünümler

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
Vazgeç
Üretici En İyi Yanıt

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
Vazgeç

Thanks alot... Works perfectly

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Nis 23
1779
1
Mar 22
3504
PDF reports Çözüldü
5
Tem 25
2229
Wrong PDF Format Çözüldü
2
Mar 24
2739
0
Kas 22
2970