跳至内容
菜单
此问题已终结
1 回复
4653 查看

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
1649
1
3月 22
3344
PDF reports 已解决
5
7月 25
2015
2
3月 24
2544
0
11月 22
2776