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