You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title:
ValueError: invalid literal for int() with base 10: 'false' in _compute_analytic_account_ids
Module
account_financial_report
Describe the bug
When installing the account_financial_report module on Odoo 15, an error is raised due to invalid string parsing in the _compute_analytic_account_ids method.
The issue occurs at this line:
python
Copiar
Editar
for account_id in map(int, key.split(",")):
When key contains the string 'false', it triggers a ValueError because 'false' cannot be converted to an integer.
To Reproduce
Affected versions:
Odoo 17.0
Steps to reproduce:
Try to install the account_financial_report module from the OCA repository.
Wait for the server to load and process the module.
Observe the traceback error.
Full traceback:
csharp
Copiar
Editar
ValueError: invalid literal for int() with base 10: 'false'
Expected behavior
The installation should succeed without errors. The method _compute_analytic_account_ids should handle invalid values gracefully and not assume all values can be cast to integers.
Additional context
Running on Odoo SaaS (no access to modify backend code)
Title:
ValueError: invalid literal for int() with base 10: 'false' in _compute_analytic_account_ids
Module
account_financial_report
Describe the bug
When installing the account_financial_report module on Odoo 15, an error is raised due to invalid string parsing in the _compute_analytic_account_ids method.
The issue occurs at this line:
python
Copiar
Editar
for account_id in map(int, key.split(",")):
When key contains the string 'false', it triggers a ValueError because 'false' cannot be converted to an integer.
To Reproduce
Affected versions:
Odoo 17.0
Steps to reproduce:
Try to install the account_financial_report module from the OCA repository.
Wait for the server to load and process the module.
Observe the traceback error.
Full traceback:
csharp
Copiar
Editar
ValueError: invalid literal for int() with base 10: 'false'
Expected behavior
The installation should succeed without errors. The method _compute_analytic_account_ids should handle invalid values gracefully and not assume all values can be cast to integers.
Additional context
Running on Odoo SaaS (no access to modify backend code)
Python 3.10+
PostgreSQL 13
Server: https://zubapy.odoo.com/
Suggested fix:
python
Copiar
Editar
try:
account_ids = list(map(int, key.split(',')))
except (ValueError, AttributeError):
account_ids = []
The text was updated successfully, but these errors were encountered: