From cf2e22cde1f6d022e5b592fa19cf93c858c55cd6 Mon Sep 17 00:00:00 2001 From: Zar21 Date: Thu, 10 Jun 2021 16:51:16 +0200 Subject: [PATCH] [14.0][FIX] account_financial_report: Incorrect format definition --- .../report/abstract_report_xlsx.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/account_financial_report/report/abstract_report_xlsx.py b/account_financial_report/report/abstract_report_xlsx.py index eaf2ebe8..4fc2872e 100644 --- a/account_financial_report/report/abstract_report_xlsx.py +++ b/account_financial_report/report/abstract_report_xlsx.py @@ -73,17 +73,22 @@ class AbstractReportXslx(models.AbstractModel): ), "format_header_amount": workbook.add_format( {"bold": True, "border": True, "bg_color": "#FFFFCC"} - ).set_num_format("#,##0." + "0" * currency_id.decimal_places), - "format_amount": workbook.add_format().set_num_format( - "#,##0." + "0" * currency_id.decimal_places ), + "format_amount": workbook.add_format(), "format_amount_bold": workbook.add_format({"bold": True}).set_num_format( "#,##0." + "0" * currency_id.decimal_places ), "format_percent_bold_italic": workbook.add_format( {"bold": True, "italic": True} - ).set_num_format("#,##0.00%"), + ), } + report_data["formats"]["format_amount"].set_num_format( + "#,##0." + "0" * currency_id.decimal_places + ) + report_data["formats"]["format_header_amount"].set_num_format( + "#,##0." + "0" * currency_id.decimal_places + ) + report_data["formats"]["format_percent_bold_italic"].set_num_format("#,##0.00%") def _set_column_width(self, report_data): """Set width for all defined columns.