[IMP] : pre-commit auto fixes

This commit is contained in:
ellbristow
2024-06-25 11:40:46 +02:00
committed by Miquel Raïch
parent e1b5b9729e
commit 3158417c4a
24 changed files with 236 additions and 183 deletions

View File

@@ -29,7 +29,7 @@ class ActivityStatementXslx(models.AbstractModel):
report_name = _("Activity Statement")
if company_id:
company = self.env["res.company"].browse(company_id)
suffix = " - {} - {}".format(company.name, company.currency_id.name)
suffix = f" - {company.name} - {company.currency_id.name}"
report_name = report_name + suffix
return report_name
@@ -300,11 +300,12 @@ class ActivityStatementXslx(models.AbstractModel):
for currency_id in currencies:
currency = self.env["res.currency"].browse(currency_id)
if currency.position == "after":
money_string = "#,##0.%s " % (
"0" * currency.decimal_places
) + "[${}]".format(currency.symbol)
money_string = (
"#,##0.%s " % ("0" * currency.decimal_places)
+ f"[${currency.symbol}]"
)
elif currency.position == "before":
money_string = "[${}]".format(currency.symbol) + " #,##0.%s" % (
money_string = f"[${currency.symbol}]" + " #,##0.%s" % (
"0" * currency.decimal_places
)
FORMATS["current_money_format"] = workbook.add_format(