From 48ca4b3205aa050cd705862fc4a5808bb4aa2fb2 Mon Sep 17 00:00:00 2001 From: Maksim Shurupov Date: Mon, 2 Dec 2024 18:36:25 +0300 Subject: [PATCH] [FIX] helpdesk_mgmt_activity: _compute_next_stage_id method is updated --- helpdesk_mgmt_activity/models/helpdesk_ticket.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/helpdesk_mgmt_activity/models/helpdesk_ticket.py b/helpdesk_mgmt_activity/models/helpdesk_ticket.py index 529ceb3175..bc95fa223f 100644 --- a/helpdesk_mgmt_activity/models/helpdesk_ticket.py +++ b/helpdesk_mgmt_activity/models/helpdesk_ticket.py @@ -72,11 +72,10 @@ def _compute_is_new_stage(self): def _compute_next_stage_id(self): """Compute next stage for ticket""" team_stages = self._get_team_stages(self.team_id) + helpdesk_ticket_stage_obj = self.env["helpdesk.ticket.stage"] for record in self: current_stage = record.stage_id - stages = team_stages.get( - record.team_id.id, self.env["helpdesk.ticket.stage"] - ) + stages = team_stages.get(record.team_id.id, helpdesk_ticket_stage_obj) next_stage = ( stages.filtered( lambda stage, _cur_stage=current_stage: stage.sequence