Skip to content
Snippets Groups Projects
Commit dc3ed690 authored by Solan Delvenne (sode)'s avatar Solan Delvenne (sode)
Browse files

[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#105707

Signed-off-by: default avatarFlorian Daloze (fda) <fda@odoo.com>
parent b6834a96
No related branches found
No related tags found
No related merge requests found
......@@ -143,7 +143,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({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment