[IMP] : black, isort, prettier
This commit is contained in:
parent
6a8c389b78
commit
9d5714cd94
@ -327,7 +327,7 @@ class AccountAsset(models.Model):
|
||||
lambda l: l.type in ("depreciate", "remove")
|
||||
and (l.init_entry or l.move_check)
|
||||
)
|
||||
value_depreciated = sum([line.amount for line in lines])
|
||||
value_depreciated = sum(line.amount for line in lines)
|
||||
residual = asset.depreciation_base - value_depreciated
|
||||
depreciated = value_depreciated
|
||||
asset.update({"value_residual": residual, "value_depreciated": depreciated})
|
||||
@ -696,7 +696,7 @@ class AccountAsset(models.Model):
|
||||
# recompute in case of deviation
|
||||
depreciated_value_posted = depreciated_value = 0.0
|
||||
if posted_lines:
|
||||
total_table_lines = sum([len(entry["lines"]) for entry in table])
|
||||
total_table_lines = sum(len(entry["lines"]) for entry in table)
|
||||
move_check_lines = asset.depreciation_line_ids.filtered("move_check")
|
||||
last_depreciation_date = last_line.line_date
|
||||
last_date_in_table = table[-1]["lines"][-1]["date"]
|
||||
@ -741,7 +741,7 @@ class AccountAsset(models.Model):
|
||||
# check if residual value corresponds with table
|
||||
# and adjust table when needed
|
||||
depreciated_value_posted = depreciated_value = sum(
|
||||
[posted_line.amount for posted_line in posted_lines]
|
||||
posted_line.amount for posted_line in posted_lines
|
||||
)
|
||||
residual_amount = asset.depreciation_base - depreciated_value
|
||||
amount_diff = round(residual_amount_table - residual_amount, digits)
|
||||
@ -1148,7 +1148,7 @@ class AccountAsset(models.Model):
|
||||
|
||||
for entry in table:
|
||||
if not entry["fy_amount"]:
|
||||
entry["fy_amount"] = sum([line["amount"] for line in entry["lines"]])
|
||||
entry["fy_amount"] = sum(line["amount"] for line in entry["lines"])
|
||||
|
||||
def _get_fy_info(self, date):
|
||||
"""Return an homogeneus data structure for fiscal years."""
|
||||
|
Loading…
Reference in New Issue
Block a user