From 0d91031631ccfab7b8bc63711a7410e5917cdf34 Mon Sep 17 00:00:00 2001
From: "Solan Delvenne (sode)" <sode@odoo.com>
Date: Mon, 14 Nov 2022 16:30:08 +0000
Subject: [PATCH] [FIX] snailmail: Fix pdf render function call

Fixes a small but massive typo that prevents snailmail from working on
version 14 to 15

closes odoo/odoo#105720

X-original-commit: dc3ed6906ef0507a4e2f896716576cb7f564d8e9
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Solan Delvenne (sode) <sode@odoo.com>
---
 addons/snailmail/models/snailmail_letter.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/snailmail/models/snailmail_letter.py b/addons/snailmail/models/snailmail_letter.py
index ebfe27f09fa8..3d98027c0d50 100644
--- a/addons/snailmail/models/snailmail_letter.py
+++ b/addons/snailmail/models/snailmail_letter.py
@@ -148,7 +148,7 @@ class SnailmailLetter(models.Model):
             paperformat = report.get_paperformat()
             if (paperformat.format == 'custom' and paperformat.page_width != 210 and paperformat.page_height != 297) or paperformat.format != 'A4':
                 raise UserError(_("Please use an A4 Paper format."))
-            pdf_bin, unused_filetype = report.with_context(snailmail_layout=not self.cover, lang='en_US').render_qweb_pdf(self.res_id)
+            pdf_bin, unused_filetype = report.with_context(snailmail_layout=not self.cover, lang='en_US')._render_qweb_pdf(self.res_id)
             if self.cover:
                 pdf_bin = self._append_cover_page(pdf_bin)
             attachment = self.env['ir.attachment'].create({
-- 
GitLab