Skip to Content
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4300 Представления

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

Related Posts Ответы Просмотры Активность
1
апр. 23
1437
1
мар. 22
2955
4
июн. 24
1520
Wrong PDF Format Решено
2
мар. 24
1952
0
нояб. 22
2324