[FIX] fix bug when submit whatsapp template

This commit is contained in:
younes 2025-07-15 10:07:46 +01:00
parent 04d610e6dc
commit 811df02a98
1 changed files with 1 additions and 1 deletions

View File

@ -756,7 +756,7 @@ class WhatsAppTemplate(models.Model):
def _generate_attachment_from_report(self, record=False):
"""Create attachment from report if relevant"""
if record and self.header_type == 'document' and self.report_id:
report_content, report_format = self.report_id._render_qweb_pdf(self.report_id, record.id)
report_content, report_format = self.report_id._render_qweb_pdf([record.id])
if self.report_id.print_report_name:
report_name = safe_eval(self.report_id.print_report_name, {'object': record}) + '.' + report_format
else: