Hello everyone,
I created a report with py3o and an email template for the Accounting module. I inserted the report into the email template in the Settings tab in the Dynamic Reports field. When sending a new or existing invoice, the system inserts my PDF file but leaves the default view for PDF and XML files. How can I replace the PDF and XML with my content? For example, I found the following under:
Path: account/wizard/account_move_send_wizard.py
@api.depends(“mail_template_id”, “sending_methods”, “invoice_edi_format”, “extra_edis”)
def _compute_mail_attachments_widget(self):
for wizard in self:
manual_attachments_data = [x for x in wizard.mail_attachments_widget or [] if x.get(“manual”)]
wizard.mail_attachments_widget = (
self._get_default_mail_attachments_widget(
wizard.move_id,
wizard.mail_template_id,
invoice_edi_format=wizard.invoice_edi_format,
extra_edis=set(wizard.extra_edis or []) or {},
pdf_report=wizard.pdf_report_id,
)
+ manual_attachments_data
)
I don't know where and how to replace the content.
I would appreciate any ideas or tips.
Thanks in advance.