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

[16.0] [FIX] account_financial_report: Prevent error related to currency from General Ledger #1092

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

gurneyalex
Copy link
Member

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

Traceback:

File "/odoo/odoo-server/odoo/addons/base/models/ir_qweb_fields.py", line 448, in value_to_html fmt = "%.{0}f".format(display_currency.decimal_places) AttributeError: 'int' object has no attribute 'decimal_places'

The above exception was the direct cause of the following exception:

Error to render compiling AST
AttributeError: 'int' object has no attribute 'decimal_places' Template: account_financial_report.report_general_ledger_lines Path: /t/div/div[2]/t[6]/t[1]/div[1]/t[1]/span/t
Node:

Port of #1042 to 16.0

…m General ledger

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

Traceback:

File "/odoo/odoo-server/odoo/addons/base/models/ir_qweb_fields.py", line 448, in value_to_html
fmt = "%.{0}f".format(display_currency.decimal_places)
AttributeError: 'int' object has no attribute 'decimal_places'

The above exception was the direct cause of the following exception:

Error to render compiling AST
AttributeError: 'int' object has no attribute 'decimal_places'
Template: account_financial_report.report_general_ledger_lines
Path: /t/div/div[2]/t[6]/t[1]/div[1]/t[1]/span/t
Node: <t t-raw="account_or_group_item_object['init_bal']['bal_curr']" t-options="{'widget': 'monetary', 'display_currency': account['currency_id']}"/>

TT42804
@pedrobaeza pedrobaeza added this to the 16.0 milestone Jan 3, 2024
@pedrobaeza
Copy link
Member

t-raw in this version is deprecated. If the content has HTML, then it should be enveloped with Markup.

Copy link

github-actions bot commented May 5, 2024

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 5, 2024
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants