-
-
Notifications
You must be signed in to change notification settings - Fork 335
Open
Labels
Description
Module
mis_builder
Describe the bug
Error when generating multi company reports
To Reproduce
Affected versions: 18.0
Steps to reproduce the behavior:
- Go to Invoicing > Reporting > MIS reports.
- Create a new report and check the multiple companies box.
- Click on Preview and the error will appear.
I link a video to reproduce this error:
https://www.loom.com/share/cfeb4d5ee7a2431481d263ae6c2058ea?sid=d87d3d57-f3ab-49a3-8b07-77bb1cdd3d22
Odoo Server Error
RPC_ERROR
Odoo Server Error
Occured on oca-mis-builder-18-0-aece0cc11946.runboat.odoo-community.org on model mis.report.instance on 2025-07-29 07:14:16 GMT
Traceback (most recent call last):
File "/opt/odoo/odoo/http.py", line 2123, in _transactioning
return service_model.retrying(func, env=self.env)
File "/opt/odoo/odoo/service/model.py", line 156, in retrying
result = func()
File "/opt/odoo/odoo/http.py", line 2090, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/opt/odoo/odoo/http.py", line 2338, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 333, in _dispatch
result = endpoint(**request.params)
File "/opt/odoo/odoo/http.py", line 754, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/opt/odoo/addons/web/controllers/dataset.py", line 36, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/api.py", line 535, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "/mnt/data/odoo-addons-dir/mis_builder/models/mis_report_instance.py", line 896, in compute
kpi_matrix = self._compute_matrix()
File "/mnt/data/odoo-addons-dir/mis_builder/models/mis_report_instance.py", line 891, in _compute_matrix
kpi_matrix.compute_sums()
File "/mnt/data/odoo-addons-dir/mis_builder/models/kpimatrix.py", line 411, in compute_sums
for row in self.iter_rows():
File "/mnt/data/odoo-addons-dir/mis_builder/models/kpimatrix.py", line 448, in iter_rows
detail_rows = sorted(detail_rows, key=lambda r: r.label)
File "/mnt/data/odoo-addons-dir/mis_builder/models/kpimatrix.py", line 448, in <lambda>
detail_rows = sorted(detail_rows, key=lambda r: r.label)
File "/mnt/data/odoo-addons-dir/mis_builder/models/kpimatrix.py", line 43, in label
return self._matrix.get_account_name(self.account_id)
File "/mnt/data/odoo-addons-dir/mis_builder/models/kpimatrix.py", line 483, in get_account_name
self._load_account_names()
File "/mnt/data/odoo-addons-dir/mis_builder/models/kpimatrix.py", line 473, in _load_account_names
self._account_names = {a.id: self._get_account_name(a) for a in accounts}
File "/mnt/data/odoo-addons-dir/mis_builder/models/kpimatrix.py", line 473, in <dictcomp>
self._account_names = {a.id: self._get_account_name(a) for a in accounts}
File "/mnt/data/odoo-addons-dir/mis_builder/models/kpimatrix.py", line 478, in _get_account_name
result = f"{result} [{account.company_id.name}]"
AttributeError: 'account.account' object has no attribute 'company_id'
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPC_ERROR
at makeErrorFromResponse (http://oca-mis-builder-18-0-aece0cc11946.runboat.odoo-community.org/web/assets/b3be0a7/web.assets_web.min.js:3148:163)
at XMLHttpRequest.<anonymous> (http://oca-mis-builder-18-0-aece0cc11946.runboat.odoo-community.org/web/assets/b3be0a7/web.assets_web.min.js:3153:13)
Expected behavior
A clear and concise description of what you expected to happen.
No error.
Additional context
Add any other context about the problem here. (e.g. OS, Python version, ...)
@moduon
MT-10671