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

Error when grouping by stage in tickets #535

Closed
gbertolani opened this issue Jan 18, 2024 · 3 comments
Closed

Error when grouping by stage in tickets #535

gbertolani opened this issue Jan 18, 2024 · 3 comments
Labels

Comments

@gbertolani
Copy link

Module

helpdesk_mgmt

Describe the bug

When i try to group by stage_id in the helpdesk.ticket model throws the following error:

  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 2443, in read_group
    result = self._read_group_raw(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 2612, in _read_group_raw
    result = self._read_group_fill_results(
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 2014, in _read_group_fill_results
    groups = group_expand(self, groups, domain, order)
  File "/opt/odoo/auto/addons/helpdesk_mgmt/models/helpdesk_ticket.py", line 26, in _read_group_stage_ids
    default_team_id = self.default_get(["team_id"])["team_id"]
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 654, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
KeyError: 'team_id'

Line in code

To Reproduce

In version 15.0, go to ticket tree view and try to group by stage_id

Expected behavior
Tickets grouped by stage_id

Regards,

@gbertolani gbertolani added the bug label Jan 18, 2024
@dalonsod
Copy link
Contributor

Hello @gbertolani you're right, tested in runboat.

@carolinafernandez-tecnativa may PR #522 added this bug?

@carolinafernandez-tecnativa
Copy link
Contributor

Hello @gbertolani you're right, tested in runboat.

@carolinafernandez-tecnativa may PR #522 added this bug?

Hi thanks! I just added the fix, could you please check it?

@gbertolani
Copy link
Author

Hello, it's now working. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants