[FIX] account_financial_report: crash in XSLX report on partner balance

This commit is contained in:
Alexis de Lattre
2024-06-14 18:08:46 +02:00
committed by chaule97
parent 8a20028357
commit 50270b6e00

View File

@@ -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