From 0d94af6532c57f1a66dc0bb5b0a4d71fd4828c09 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sat, 30 May 2026 21:45:05 -0400 Subject: [PATCH] fix(fusion_clock): render payslip PDF via report.id, not report_name Odoo 19's _get_report() resolves a dotted string report_ref through env.ref() as an XML ID, which lands on the QWeb view rather than the ir.actions.report action. Pass the action id (matches every other _render_qweb_pdf call site in the repo). Co-Authored-By: Claude Opus 4.8 --- fusion_clock/controllers/portal_clock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fusion_clock/controllers/portal_clock.py b/fusion_clock/controllers/portal_clock.py index e4bc7d1f..5b7eb3d2 100644 --- a/fusion_clock/controllers/portal_clock.py +++ b/fusion_clock/controllers/portal_clock.py @@ -356,7 +356,7 @@ class FusionClockPortal(CustomerPortal): [('model', '=', 'hr.payslip'), ('report_type', '=', 'qweb-pdf')], limit=1) if not report: return request.redirect('/my/clock/payslips/%s' % payslip_id) - pdf_content, _ctype = report._render_qweb_pdf(report.report_name, [payslip.id]) + pdf_content, _ctype = report._render_qweb_pdf(report.id, [payslip.id]) slip_ref = payslip.number if 'number' in payslip._fields else False filename = 'Payslip-%s.pdf' % (slip_ref or payslip.id) return request.make_response(pdf_content, headers=[