[FIX] account_financial_report: Prevent error related to currency from Trial Balance

Use case: Generate report (showing foreign currency) with accounts with defined currency.

Traceback:

Error to render compiling AST
AttributeError: 'int' object has no attribute 'decimal_places'
Template: account_financial_report.report_trial_balance_line
Path: /t/div/t[3]/t[1]/t/t/div/span/t
Node: <t t-esc="balance['initial_currency_balance']" t-options="{'widget': 'monetary', 'display_currency': balance['currency_id']}"/>

The error occured while rendering the template account_financial_report.report_trial_balance_line and evaluating the following expression: <t t-esc="balance['initial_currency_balance']" t-options="{'widget': 'monetary', 'display_currency': balance['currency_id']}"/>
This commit is contained in:
Víctor Martínez
2023-07-25 08:55:42 +02:00
committed by chaule97
parent 2da30a0f74
commit 9063f74cee
2 changed files with 17 additions and 4 deletions

View File

@@ -755,4 +755,5 @@ class TrialBalanceReport(models.AbstractModel):
"accounts_data": accounts_data,
"partners_data": partners_data,
"show_hierarchy_level": show_hierarchy_level,
"currency_model": self.env["res.currency"],
}