Skip to Content
Menu
This question has been flagged
2 Replies
3807 Views

Hello community, 

I have a custom report development in pdf in Odoo 17 in the accounting module. 

What I need is to be able to attach that custom file in the send and print wizard.


This is a short excerpt from the report's statement: 



Customized format
A4
Portrait
1
10
7
7

4
90

Custom Invoice
account.move
qweb-pdf
name_module.custom_invoice_report_pe
object._get_report_base_filename()
(object.state == 'posted') and ((object.name or 'INV').replace('/','_')+'.pdf')


report

and this is an excerpt from the new report ...








....





For now I only get a standard attachment attached which is a blank report.


Does anyone know how to attach that file or have any support or a reference ?

Thanks

Avatar
Discard
Best Answer

Hi,

This can be done from the user interface as well as from the code side, to do it from the user interface, follow the below steps:

  • Enable developer mode
  • Navigate to Email templates menu under settings -> technical -> email
  • Open the email template named "invoice sending"
  • In the settings page, from the "Dynamic Reports" column, remove default report and add the newly designed report




Thanks

Avatar
Discard
Best Answer

Hi,

To send your custom report with the email from the send & print button, either you can create a new email template with the file attachment, or you can customize the existing template and add your custom report to it.please refer the below blog to know how to attach a pdf or excel report in email template

https://www.cybrosys.com/blog/how-to-add-email-attachments-pdf-excel-in-odoo-16


Hope it helps


Avatar
Discard
Related Posts Replies Views Activity
1
Feb 25
1029
1
Dec 24
1225
2
Apr 24
2610
0
Mar 24
870
0
May 24
608