Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4925 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit

Thanks alot... Works perfectly

Related Posts Odpovědi Zobrazení Aktivita
1
dub 23
1937
1
bře 22
3627
PDF reports Vyřešeno
5
čvc 25
2385
2
bře 24
2929
0
lis 22
3079