[FIX] account_financial_report: allow navigation on all fields

Pass res_id correctly to lines to allow navigation on the fields

In the open items ledger, the res_id attribute of the invoice
in the report was getting: (id, move_name)
The result was that, when clicking the line, it would redirect
to a new record, instead of the existing.
This passes only the id to the line, solving that issue.

Fix menu item name

TT29371
This commit is contained in:
João Marques
2021-04-27 07:06:31 +01:00
committed by chaule97
parent 970f614aac
commit 0abfff7f16
3 changed files with 25 additions and 6 deletions

View File

@@ -179,7 +179,7 @@
<!--## move-->
<div class="act_as_cell left">
<span
t-att-res-id="line['move_id']"
t-att-res-id="line['entry_id']"
res-model="account.move"
view-type="form"
>
@@ -188,16 +188,34 @@
</div>
<!--## journal-->
<div class="act_as_cell left">
<span t-esc="journals_data[line['journal_id']]['code']" />
<span
t-att-res-id="journals_data[line['journal_id']]['id']"
res-model="account.journal"
view-type="form"
>
<t t-esc="journals_data[line['journal_id']]['code']" />
</span>
</div>
<!--## account code-->
<div class="act_as_cell left">
<span t-esc="accounts_data[account_id]['code']" />
<span
t-att-res-id="accounts_data[account_id]['id']"
res-model="account.account"
view-type="form"
>
<t t-esc="accounts_data[account_id]['code']" />
</span>
</div>
<!--## partner-->
<div class="act_as_cell left">
<!-- <span t-if="line.get('partner_id', False)" t-esc="line['partner_id']"/>-->
<span t-esc="line['partner_name']" />
<span
t-if="line.get('partner_id', False)"
t-att-res-id="line['partner_id']"
res-model="res.partner"
view-type="form"
>
<t t-esc="line['partner_name']" />
</span>
</div>
<!--## ref - label-->
<div class="act_as_cell left">