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
I get an error when I reference a sub report from a kpi epression.
The module is mis-builder on v17 CE.
When generating a preview I get a "TypeError: type SimpleArray_1 doesn't define round method" when I reference a sub report from one of the lines of kpi epression. Here's the trace.
Traceback (most recent call last):
File "/odoo17/odoo17-server/odoo/http.py", line 1783, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/odoo17/odoo17-server/odoo/service/model.py", line 133, in retrying
result = func()
File "/odoo17/odoo17-server/odoo/http.py", line 1810, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/odoo17/odoo17-server/odoo/http.py", line 2014, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/odoo17/odoo17-server/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "/odoo17/odoo17-server/odoo/http.py", line 759, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/odoo17/odoo17-server/addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/odoo17/odoo17-server/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo17/odoo17-server/odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo17/odoo17-server/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_instance.py", line 876, in compute
kpi_matrix = self._compute_matrix()
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_instance.py", line 869, in _compute_matrix
self._add_column(aep, kpi_matrix, period, period.name, description)
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_instance.py", line 832, in _add_column
return self._add_column_move_lines(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_instance.py", line 801, in _add_column_move_lines
self.report_id._declare_and_compute_period(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report.py", line 896, in _declare_and_compute_period
self._declare_and_compute_col(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report.py", line 753, in _declare_and_compute_col
kpi_matrix.set_values(kpi, col_key, vals, drilldown_args)
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/kpimatrix.py", line 213, in set_values
self.set_values_detail_account(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/kpimatrix.py", line 244, in set_values_detail_account
val_rendered = self._style_model.render(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_style.py", line 159, in render
return self.render_num(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_style.py", line 180, in render_num
value = round(value / float(divider or 1), dp or 0) or 0
TypeError: type SimpleArray_1 doesn't define round method
Hi,
I get an error when I reference a sub report from a kpi epression.
The module is mis-builder on v17 CE.
When generating a preview I get a "TypeError: type SimpleArray_1 doesn't define round method" when I reference a sub report from one of the lines of kpi epression. Here's the trace.
Traceback (most recent call last):
File "/odoo17/odoo17-server/odoo/http.py", line 1783, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/odoo17/odoo17-server/odoo/service/model.py", line 133, in retrying
result = func()
File "/odoo17/odoo17-server/odoo/http.py", line 1810, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/odoo17/odoo17-server/odoo/http.py", line 2014, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/odoo17/odoo17-server/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "/odoo17/odoo17-server/odoo/http.py", line 759, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/odoo17/odoo17-server/addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/odoo17/odoo17-server/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo17/odoo17-server/odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo17/odoo17-server/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_instance.py", line 876, in compute
kpi_matrix = self._compute_matrix()
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_instance.py", line 869, in _compute_matrix
self._add_column(aep, kpi_matrix, period, period.name, description)
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_instance.py", line 832, in _add_column
return self._add_column_move_lines(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_instance.py", line 801, in _add_column_move_lines
self.report_id._declare_and_compute_period(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report.py", line 896, in _declare_and_compute_period
self._declare_and_compute_col(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report.py", line 753, in _declare_and_compute_col
kpi_matrix.set_values(kpi, col_key, vals, drilldown_args)
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/kpimatrix.py", line 213, in set_values
self.set_values_detail_account(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/kpimatrix.py", line 244, in set_values_detail_account
val_rendered = self._style_model.render(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_style.py", line 159, in render
return self.render_num(
File "/odoo17/custom/addons/v17-custom-modules/mis_builder/models/mis_report_style.py", line 180, in render_num
value = round(value / float(divider or 1), dp or 0) or 0
TypeError: type SimpleArray_1 doesn't define round method
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPC_ERROR
at makeErrorFromResponse (http://37.60.247.107:8017/web/assets/db80a43/web.assets_web.min.js:2888:163)
at XMLHttpRequest. (http://37.60.247.107:8017/web/assets/db80a43/web.assets_web.min.js:2892:13)
Steps to reproduce the behavior:
This works in previous versions so I'm guessing this is unique to v17.
The text was updated successfully, but these errors were encountered: