Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
4685 Näkymät

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
Hylkää
Tekijä Paras vastaus

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
Hylkää

Thanks alot... Works perfectly

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
huhtik. 23
1666
1
maalisk. 22
3368
PDF reports Ratkaistu
5
heinäk. 25
2056
2
maalisk. 24
2591
0
marrask. 22
2826