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

[v13] Error with budget by account #276

Closed
fclementic2c opened this issue Apr 15, 2020 · 2 comments
Closed

[v13] Error with budget by account #276

fclementic2c opened this issue Apr 15, 2020 · 2 comments

Comments

@fclementic2c
Copy link
Member

fclementic2c commented Apr 15, 2020

Here is the report I have created:

screenshot-localhost_8069-2020 04 (2)

I get the following error with I add on my P&L report a comparison with a budget by account.

https://drive.google.com/open?id=1v57-UuUj6Z3f0xBu6LVu1NThzBjscp3Y

Error:
Odoo Server Error

Traceback (most recent call last):
File "/odoo/src/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/src/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/odoo/src/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/odoo/src/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/odoo/src/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/src/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/src/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/src/odoo/http.py", line 915, in call
return self.method(*args, **kw)
File "/odoo/src/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/odoo/src/addons/web/controllers/main.py", line 1322, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/odoo/src/addons/web/controllers/main.py", line 1314, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/src/odoo/api.py", line 387, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo/src/odoo/api.py", line 374, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo/external-src/mis-builder/mis_builder/models/mis_report_instance.py", line 806, in compute
kpi_matrix = self._compute_matrix()
File "/odoo/external-src/mis-builder/mis_builder/models/mis_report_instance.py", line 799, in _compute_matrix
self._add_column(aep, kpi_matrix, period, period.name, description)
File "/odoo/external-src/mis-builder/mis_builder_budget/models/mis_report_instance.py", line 81, in _add_column
aep, kpi_matrix, period, label, description
File "/odoo/external-src/mis-builder/mis_builder/models/mis_report_instance.py", line 743, in _add_column_move_lines
no_auto_expand_accounts=self.no_auto_expand_accounts,
File "/odoo/external-src/mis-builder/mis_builder/models/mis_report.py", line 887, in _declare_and_compute_period
expression_evaluator.aep_do_queries()
File "/odoo/external-src/mis-builder/mis_builder/models/expression_evaluator.py", line 37, in aep_do_queries
self.aml_model,
File "/odoo/external-src/mis-builder/mis_builder/models/aep.py", line 353, in do_queries
lazy=False,
File "/odoo/external-src/mis-builder/mis_builder/models/prorata_read_group_mixin.py", line 90, in read_group
lazy=lazy,
File "/odoo/src/odoo/models.py", line 2140, in read_group
result = self._read_group_raw(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
File "/odoo/src/odoo/models.py", line 2183, in _read_group_raw
for fspec in fields:
TypeError: 'module' object is not iterable

@sbidoul
Copy link
Member

sbidoul commented Apr 15, 2020

@fclementic2c can you try with #277 ?

That's a stupid bug indeed. I think it's triggered because you have bale in your expressions and that's normally not used for a P&L (only balp). That's why I had not seen that during testing. So you triggered the code path that skips the pro-rata temporis adjustments of budgeted amounts.

@sbidoul
Copy link
Member

sbidoul commented Apr 22, 2020

Fixed in #277

@sbidoul sbidoul closed this as completed Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants