[IMP] account_financial_report: pre-commit auto fixes
This commit is contained in:
@@ -536,7 +536,7 @@ class AbstractReportXslx(models.AbstractModel):
|
||||
currency = self.env["res.currency"].browse(line_object["currency_id"])
|
||||
else:
|
||||
currency = line_object["currency_id"]
|
||||
field_name = "{}_{}".format(field_prefix, currency.name)
|
||||
field_name = f"{field_prefix}_{currency.name}"
|
||||
if hasattr(self, field_name):
|
||||
format_amt = getattr(self, field_name)
|
||||
else:
|
||||
@@ -558,7 +558,7 @@ class AbstractReportXslx(models.AbstractModel):
|
||||
currency = self.env["res.currency"].browse(line_dict["currency_id"])
|
||||
else:
|
||||
currency = line_dict["currency_id"]
|
||||
field_name = "{}_{}".format(field_prefix, currency.name)
|
||||
field_name = f"{field_prefix}_{currency.name}"
|
||||
if hasattr(self, field_name):
|
||||
format_amt = getattr(self, field_name)
|
||||
else:
|
||||
|
||||
@@ -196,7 +196,7 @@ class AgedPartnerBalanceReport(models.AbstractModel):
|
||||
elif not move_line["name"]:
|
||||
ref_label = move_line["ref"]
|
||||
else:
|
||||
ref_label = move_line["ref"] + str(" - ") + move_line["name"]
|
||||
ref_label = move_line["ref"] + " - " + move_line["name"]
|
||||
move_line_data.update(
|
||||
{
|
||||
"line_rec": line_model.browse(move_line["id"]),
|
||||
|
||||
@@ -16,7 +16,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
|
||||
report_name = _("Aged Partner Balance")
|
||||
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
|
||||
|
||||
|
||||
@@ -347,7 +347,7 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
elif move_line_data["name"] == "":
|
||||
ref_label = move_line_data["ref"]
|
||||
else:
|
||||
ref_label = move_line_data["ref"] + str(" - ") + move_line_data["name"]
|
||||
ref_label = move_line_data["ref"] + " - " + move_line_data["name"]
|
||||
move_line_data.update({"ref_label": ref_label})
|
||||
return move_line_data
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class GeneralLedgerXslx(models.AbstractModel):
|
||||
report_name = _("General Ledger")
|
||||
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
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class JournalLedgerXslx(models.AbstractModel):
|
||||
report_name = _("Journal Ledger")
|
||||
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
|
||||
|
||||
@@ -149,7 +149,7 @@ class JournalLedgerXslx(models.AbstractModel):
|
||||
_("Journals"),
|
||||
", ".join(
|
||||
[
|
||||
"{} - {}".format(report_journal.code, report_journal.name)
|
||||
f"{report_journal.code} - {report_journal.name}"
|
||||
for report_journal in report.journal_ids
|
||||
]
|
||||
),
|
||||
@@ -184,7 +184,7 @@ class JournalLedgerXslx(models.AbstractModel):
|
||||
and journal.currency_id.name
|
||||
or journal.company_id.currency_id.name
|
||||
)
|
||||
sheet_name = "{} ({}) - {}".format(journal.code, currency_name, journal.name)
|
||||
sheet_name = f"{journal.code} ({currency_name}) - {journal.name}"
|
||||
self._generate_moves_content(
|
||||
workbook, sheet_name, report, res_data, ledger["report_moves"], report_data
|
||||
)
|
||||
@@ -202,9 +202,7 @@ class JournalLedgerXslx(models.AbstractModel):
|
||||
and journal.currency_id.name
|
||||
or journal.company_id.currency_id.name
|
||||
)
|
||||
sheet_name = "Tax - {} ({}) - {}".format(
|
||||
journal.code, currency_name, journal.name
|
||||
)
|
||||
sheet_name = f"Tax - {journal.code} ({currency_name}) - {journal.name}"
|
||||
self._generate_taxes_summary(
|
||||
workbook, sheet_name, ledger["tax_lines"], report_data
|
||||
)
|
||||
|
||||
@@ -147,7 +147,7 @@ class OpenItemsReport(models.AbstractModel):
|
||||
elif not move_line["name"]:
|
||||
ref_label = move_line["ref"]
|
||||
else:
|
||||
ref_label = move_line["ref"] + str(" - ") + move_line["name"]
|
||||
ref_label = move_line["ref"] + " - " + move_line["name"]
|
||||
|
||||
move_line.update(
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class OpenItemsXslx(models.AbstractModel):
|
||||
report_name = _("Open Items")
|
||||
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
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class TrialBalanceXslx(models.AbstractModel):
|
||||
report_name = _("Trial Balance")
|
||||
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
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class VATReportXslx(models.AbstractModel):
|
||||
report_name = _("Vat Report")
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user