From 5fd2a8f0bd216b736291e5ffe5f2570da0b05f9b Mon Sep 17 00:00:00 2001 From: Simone Rubino Date: Wed, 24 May 2023 18:23:46 +0200 Subject: [PATCH] [FIX] account_financial_report: Empty format --- account_financial_report/report/abstract_report_xlsx.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/account_financial_report/report/abstract_report_xlsx.py b/account_financial_report/report/abstract_report_xlsx.py index 4c0cbe70..66a41701 100644 --- a/account_financial_report/report/abstract_report_xlsx.py +++ b/account_financial_report/report/abstract_report_xlsx.py @@ -75,9 +75,7 @@ class AbstractReportXslx(models.AbstractModel): {"bold": True, "border": True, "bg_color": "#FFFFCC"} ), "format_amount": workbook.add_format(), - "format_amount_bold": workbook.add_format({"bold": True}).set_num_format( - "#,##0." + "0" * currency_id.decimal_places - ), + "format_amount_bold": workbook.add_format({"bold": True}), "format_percent_bold_italic": workbook.add_format( {"bold": True, "italic": True} ), @@ -89,6 +87,9 @@ class AbstractReportXslx(models.AbstractModel): "#,##0." + "0" * currency_id.decimal_places ) report_data["formats"]["format_percent_bold_italic"].set_num_format("#,##0.00%") + report_data["formats"]["format_amount_bold"].set_num_format( + "#,##0." + "0" * currency_id.decimal_places + ) def _set_column_width(self, report_data): """Set width for all defined columns.