Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][FIX] account_financial_report: keyError on fin_bal_currency_id #1259

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion account_financial_report/report/general_ledger_xlsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def _generate_report_content(self, workbook, report, data, report_data):
"final_balance": account["fin_bal"]["balance"],
}
)
if foreign_currency and account["fin_bal_currency_id"]:
if foreign_currency and account.get("fin_bal_currency_id", False):
account.update(
{
"final_bal_curr": total_bal_curr,
Expand Down
12 changes: 3 additions & 9 deletions account_financial_report/report/templates/general_ledger.xml
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,7 @@
</div>
<t t-if="foreign_currency">
<t t-if="account['currency_id']">
<t
t-set="account_currency"
t-value="currency_model.browse(account['currency_id'])"
/>
<t t-set="account_currency" t-value="account['currency_id']" />
<div class="act_as_cell amount" style="width: 3.63%;">
<t t-if="type == 'account_type'">
<span
Expand Down Expand Up @@ -696,11 +693,8 @@
/>
<t t-set="misc_grouped_domain" t-value="[]" t-else="" />
<t t-if="foreign_currency">
<t t-if="account['fin_bal_currency_id']">
<t
t-set="account_currency"
t-value="currency_model.browse(account['fin_bal_currency_id'])"
/>
<t t-if="account['currency_id']">
<t t-set="account_currency" t-value="account['currency_id']" />
<div class="act_as_cell amount" style="width: 3.63%;">
<t t-if="type == 'account_type'">
<span>
Expand Down
Loading