コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4793 ビュー

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!

アバター
破棄
著作者 最善の回答

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



アバター
破棄

Thanks alot... Works perfectly

関連投稿 返信 ビュー 活動
1
4月 23
1751
1
3月 22
3447
PDF reports 解決済
5
7月 25
2161
2
3月 24
2698
0
11月 22
2904