[MIG] account_financial_report: Migration to 17.0

This commit is contained in:
Henrik Norlin
2024-01-24 19:36:27 +01:00
committed by chaule97
parent 0b128f03ee
commit e6904a2449
8 changed files with 53 additions and 72 deletions

View File

@@ -209,7 +209,6 @@ class GeneralLedgerReport(models.AbstractModel):
else:
prt_id = gl["partner_id"][0]
prt_name = gl["partner_id"][1]
prt_name = prt_name._value
acc_id = gl["account_id"][0]
data[acc_id][prt_id] = self._prepare_gen_ld_data_item(gl)
data[acc_id][prt_id]["id"] = prt_id
@@ -236,7 +235,6 @@ class GeneralLedgerReport(models.AbstractModel):
if "tax_line_id" in gl and gl["tax_line_id"]:
tax_id = gl["tax_line_id"][0]
tax_name = gl["tax_line_id"][1]
tax_name = tax_name._value
else:
tax_id = 0
tax_name = "Missing Tax"

View File

@@ -211,6 +211,6 @@ class OpenItemsXslx(models.AbstractModel):
name = my_object["code"] + " - " + my_object["name"]
my_object["residual"] = total_amount[account_id]["residual"]
label = _("Ending balance")
return super(OpenItemsXslx, self).write_ending_balance_from_dict(
return super().write_ending_balance_from_dict(
my_object, name, label, report_data
)

View File

@@ -257,7 +257,7 @@ class TrialBalanceXslx(models.AbstractModel):
line_object.currency_id = line_object.report_account_id.currency_id
elif type_object == "account":
line_object.currency_id = line_object.currency_id
return super(TrialBalanceXslx, self).write_line(line_object, report_data)
return super().write_line(line_object, report_data)
def write_account_footer(self, account, name_value, report_data):
"""Specific function to write account footer for Trial Balance"""