-
-
Notifications
You must be signed in to change notification settings - Fork 412
[18.0][MIG] purchase_request_analytic: Migration to 18.0 #790
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
base: 18.0
Are you sure you want to change the base?
Conversation
|
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. |
[IMP]add tests
…hase request when all the lines have same analytic account id. Before this change the analytic account is empty in those cases, and because of that, the search of purchase request by analytic account is not working
1aba95b to
5382640
Compare
luisDIXMIT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got this error when grouping purchase requests by analytic distribution.
Traceback (most recent call last):
File "/opt/odoo/odoo/http.py", line 2166, 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 2133, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/opt/odoo/odoo/http.py", line 2381, 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 "/opt/odoo/addons/web/models/models.py", line 246, in web_read_group
groups = self._web_read_group(domain, fields, groupby, limit, offset, orderby, lazy)
File "/opt/odoo/addons/web/models/models.py", line 272, in _web_read_group
groups = self.read_group(domain, fields, groupby, offset=offset, limit=limit,
File "/opt/odoo/odoo/models.py", line 2888, in read_group
rows = self._read_group(domain, annotated_groupby.values(), annotated_aggregates.values(), offset=offset, limit=limit, order=orderby)
File "/opt/odoo/odoo/models.py", line 2005, in _read_group
groupby_terms: dict[str, SQL] = {
File "/opt/odoo/odoo/models.py", line 2006, in
spec: self._read_group_groupby(spec, query)
File "/opt/odoo/addons/analytic/models/analytic_mixin.py", line 111, in _read_group_groupby
self._get_count_id(query),
File "/opt/odoo/addons/analytic/models/analytic_mixin.py", line 138, in _get_count_id
raise ValueError(f"{query.table} does not support analytic_distribution grouping.")
ValueError: purchase_request does not support analytic_distribution grouping.
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPC_ERROR
at makeErrorFromResponse (http://oca-account-analytic-18-0-pr790-53826407fa04.runboat.odoo-community.org/web/assets/48618de/web.assets_web.min.js:3163:165)
at XMLHttpRequest. (http://oca-account-analytic-18-0-pr790-53826407fa04.runboat.odoo-community.org/web/assets/48618de/web.assets_web.min.js:3168:13)
No description provided.