From ab221c7c3501a429d6f4035235ab52e9cc2e3526 Mon Sep 17 00:00:00 2001 From: Isaac Gallart Bochons Date: Thu, 27 Oct 2022 16:00:50 +0200 Subject: [PATCH] [14.0][FIX] report_qweb_signer: Fix TypeError TypeError: 'int' object is not subscriptable --- report_qweb_signer/models/ir_actions_report.py | 2 ++ report_qweb_signer/readme/CONTRIBUTORS.rst | 3 +++ 2 files changed, 5 insertions(+) diff --git a/report_qweb_signer/models/ir_actions_report.py b/report_qweb_signer/models/ir_actions_report.py index 8702a70e9..cb88ec02b 100644 --- a/report_qweb_signer/models/ir_actions_report.py +++ b/report_qweb_signer/models/ir_actions_report.py @@ -40,6 +40,8 @@ class IrActionsReport(models.Model): return False company_id = self.env.company.id if res_ids: + if isinstance(res_ids, int): + res_ids = [res_ids] obj = self.env[self.model].browse(res_ids[0]) if "company_id" in obj: company_id = obj.company_id.id or company_id diff --git a/report_qweb_signer/readme/CONTRIBUTORS.rst b/report_qweb_signer/readme/CONTRIBUTORS.rst index 9b6a265ad..f3497e0f5 100644 --- a/report_qweb_signer/readme/CONTRIBUTORS.rst +++ b/report_qweb_signer/readme/CONTRIBUTORS.rst @@ -7,3 +7,6 @@ * David Vidal * Santi Argüeso * Omar Castiñeira +* `Punt Sistemes `_: + + * Isaac Gallart