[FIX] account_financial_report: General ledger changes:

- Fix total_bal_curr value from General ledger to prevent wrong values
- Prevent wrong values

TT41041
pull/995/head
Víctor Martínez 2023-01-05 17:14:32 +01:00
parent 60d4a2ecda
commit a402285fae
2 changed files with 3 additions and 6 deletions

View File

@ -146,7 +146,7 @@ class GeneralLedgerXslx(models.AbstractModel):
# For each account
for account in general_ledger:
# Write account title
total_bal_curr = account["init_bal"].get("bal_curr", 0)
total_bal_curr = 0
self.write_array_title(
account["code"] + " - " + accounts_data[account["id"]]["name"],
report_data,
@ -235,7 +235,7 @@ class GeneralLedgerXslx(models.AbstractModel):
else:
# For each partner
total_bal_curr = account["init_bal"]["bal_curr"]
total_bal_curr = 0
for group_item in account["list_grouped"]:
# Write partner title
self.write_array_title(group_item["name"], report_data)

View File

@ -363,10 +363,7 @@
</t>
</div>
<!-- Display each lines -->
<t
t-set="total_bal_curr"
t-value="account_or_group_item_object['init_bal'].get('bal_curr', 0)"
/>
<t t-set="total_bal_curr" t-value="0" />
<t t-foreach="account_or_group_item_object['move_lines']" t-as="line">
<!-- # lines or centralized lines -->
<div class="act_as_row lines">