Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4795 Переглядів

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
1754
1
бер. 22
3448
PDF reports Вирішено
5
лип. 25
2162
Wrong PDF Format Вирішено
2
бер. 24
2699
0
лист. 22
2907