跳至内容
菜单
此问题已终结
2 回复
3882 查看

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

形象
丢弃
最佳答案

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

形象
丢弃
最佳答案

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


形象
丢弃
相关帖文 回复 查看 活动
1
2月 25
1087
1
12月 24
1290
2
4月 24
2676
0
3月 24
885
0
5月 24
630