From 50270b6e008129fef7ad8e3fd324fd842aec3ffc Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 14 Jun 2024 18:08:46 +0200 Subject: [PATCH] [FIX] account_financial_report: crash in XSLX report on partner balance --- account_financial_report/report/abstract_report_xlsx.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/account_financial_report/report/abstract_report_xlsx.py b/account_financial_report/report/abstract_report_xlsx.py index 5c8a332e..4d93de63 100644 --- a/account_financial_report/report/abstract_report_xlsx.py +++ b/account_financial_report/report/abstract_report_xlsx.py @@ -597,9 +597,8 @@ class AbstractReportXslx(models.AbstractModel): {"bold": True, "border": True, "bg_color": "#FFFFCC"} ) report_data["field_name"] = format_amt - format_amount = "#,##0." + ( - "0" * line_object["currency_id"].decimal_places - ) + currency = self.env["res.currency"].browse(line_object["currency_id"]) + format_amount = "#,##0." + ("0" * currency.decimal_places) format_amt.set_num_format(format_amount) return format_amt