Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- 회계
- 재고 관리
- PoS
- 프로젝트
- MRP
신고된 질문입니다
Hi,
The attachments you see in the Send & Print wizard (the default PDF invoice and XML files) are not controlled by the email template. Even if you add your py3o report in the template’s Dynamic Reports field, Odoo will still generate and attach the default PDF and default EDI/XML files, because those come from the method _get_default_mail_attachments_widget() inside account_move_send_wizard.py. That method always builds the system-generated invoice PDF and EDI files unless you override it with custom code. The line you found (pdf_report=wizard.pdf_report_id) only allows Odoo to replace the PDF with another Odoo report, not with a file generated by custom logic like py3o.
To fully replace the PDF and XML attachments with your own content, you must create a custom module that overrides _get_default_mail_attachments_widget() and returns only the attachments you want (your py3o output), instead of the default ones. This cannot be done in the UI or in email templates; it must be done in Python by inheriting the wizard model and rewriting how the attachment list is built. Only by overriding that method—and optionally intercepting action_send_and_print()—can you stop Odoo from generating or attaching the original PDF and XML files.
Hope it helps
| 관련 게시물 | 답글 | 화면 | 활동 | |
|---|---|---|---|---|
|
|
0
11월 25
|
4 | ||
|
|
0
11월 25
|
2 | ||
|
|
0
11월 25
|
2 | ||
|
|
1
11월 25
|
315 | ||
|
|
4
11월 25
|
1807 |