[FIX] account_financial_report: Set the correct value of column 'Cumul cur.' in general ledger
TT39754pull/939/head
parent
55ffebd6ec
commit
c9c28a4ba5
|
@ -84,7 +84,9 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||
{
|
||||
"header": _("Cumul cur."),
|
||||
"field": "total_bal_curr",
|
||||
"type": "amount_different_company_currency",
|
||||
"field_initial_balance": "initial_bal_curr",
|
||||
"field_final_balance": "final_bal_curr",
|
||||
"type": "amount_currency",
|
||||
"width": 10,
|
||||
},
|
||||
]
|
||||
|
@ -152,6 +154,7 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||
# For each account
|
||||
for account in general_ledger:
|
||||
# Write account title
|
||||
total_bal_curr = account["init_bal"]["bal_curr"]
|
||||
self.write_array_title(
|
||||
account["code"] + " - " + accounts_data[account["id"]]["name"],
|
||||
report_data,
|
||||
|
@ -176,7 +179,6 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||
self.write_initial_balance_from_dict(account, report_data)
|
||||
|
||||
# Display account move lines
|
||||
total_bal_curr = 0
|
||||
for line in account["move_lines"]:
|
||||
line.update(
|
||||
{
|
||||
|
@ -233,6 +235,7 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||
|
||||
else:
|
||||
# For each partner
|
||||
total_bal_curr = account["init_bal"]["bal_curr"]
|
||||
for group_item in account["list_grouped"]:
|
||||
# Write partner title
|
||||
self.write_array_title(group_item["name"], report_data)
|
||||
|
@ -262,7 +265,6 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||
self.write_initial_balance_from_dict(group_item, report_data)
|
||||
|
||||
# Display account move lines
|
||||
total_bal_curr = 0
|
||||
for line in group_item["move_lines"]:
|
||||
line.update(
|
||||
{
|
||||
|
|
|
@ -335,7 +335,30 @@
|
|||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<div class="act_as_cell amount" style="width: 3.63%;" />
|
||||
<div class="act_as_cell amount" style="width: 3.63%;">
|
||||
<t t-if="type == 'account_type'">
|
||||
<span
|
||||
t-att-domain="misc_domain"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['init_bal']['bal_curr']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': account['currency_id']}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="type == 'grouped_type'">
|
||||
<span
|
||||
t-att-domain="misc_domain+partner_domain"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['init_bal']['bal_curr']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': account['currency_id']}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="not account['currency_id']">
|
||||
<div class="act_as_cell" style="width: 3.63%;" />
|
||||
|
@ -344,7 +367,10 @@
|
|||
</t>
|
||||
</div>
|
||||
<!-- Display each lines -->
|
||||
<t t-set="total_bal_curr" t-value="0" />
|
||||
<t
|
||||
t-set="total_bal_curr"
|
||||
t-value="account_or_group_item_object['init_bal']['bal_curr'] or 0"
|
||||
/>
|
||||
<t t-foreach="account_or_group_item_object['move_lines']" t-as="line">
|
||||
<!-- # lines or centralized lines -->
|
||||
<div class="act_as_row lines">
|
||||
|
@ -698,7 +724,38 @@
|
|||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<div class="act_as_cell amount" style="width: 3.63%;" />
|
||||
<div class="act_as_cell amount" style="width: 3.63%;">
|
||||
<t t-if="type == 'account_type'">
|
||||
<span>
|
||||
<a
|
||||
t-att-data-t-att-domain="misc_domain"
|
||||
t-att-data-res-model="'account.move.line'"
|
||||
class="o_account_financial_reports_web_action_monetary_multi"
|
||||
style="color: black;"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['fin_bal']['bal_curr']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': account['currency_id']}"
|
||||
/>
|
||||
</a>
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="type == 'grouped_type'">
|
||||
<span>
|
||||
<a
|
||||
t-att-data-t-att-domain="misc_domain+partner_domain"
|
||||
t-att-data-res-model="'account.move.line'"
|
||||
class="o_account_financial_reports_web_action_monetary_multi"
|
||||
style="color: black;"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['fin_bal']['bal_curr']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': account['currency_id']}"
|
||||
/>
|
||||
</a>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="not account['currency_id']">
|
||||
<div class="act_as_cell amount" style="width: 3.63%;" />
|
||||
|
|
Loading…
Reference in New Issue