콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4964 화면

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
1944
1
3월 22
3650
PDF reports 해결 완료
5
7월 25
2414
Wrong PDF Format 해결 완료
2
3월 24
2958
0
11월 22
3099