Browse Source

[14.0][FIX] account_financial_report: Incorrect format definition

pull/795/head
Zar21 4 years ago
committed by Ethan Hildick
parent
commit
cf2e22cde1
  1. 13
      account_financial_report/report/abstract_report_xlsx.py

13
account_financial_report/report/abstract_report_xlsx.py

@ -73,17 +73,22 @@ class AbstractReportXslx(models.AbstractModel):
), ),
"format_header_amount": workbook.add_format( "format_header_amount": workbook.add_format(
{"bold": True, "border": True, "bg_color": "#FFFFCC"} {"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( "format_amount_bold": workbook.add_format({"bold": True}).set_num_format(
"#,##0." + "0" * currency_id.decimal_places "#,##0." + "0" * currency_id.decimal_places
), ),
"format_percent_bold_italic": workbook.add_format( "format_percent_bold_italic": workbook.add_format(
{"bold": True, "italic": True} {"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): def _set_column_width(self, report_data):
"""Set width for all defined columns. """Set width for all defined columns.

Loading…
Cancel
Save