From 76b579112f4930283097571117d26d38bcaf7852 Mon Sep 17 00:00:00 2001 From: Maksim Shurupov Date: Mon, 4 Nov 2024 19:42:34 +0300 Subject: [PATCH] [FIX] helpdesk_mgmt_activity: Update stage after create activity is fixed and for activity set default activity user or current user --- helpdesk_mgmt_activity/README.rst | 12 +++++++----- helpdesk_mgmt_activity/models/helpdesk_ticket.py | 2 +- helpdesk_mgmt_activity/readme/DESCRIPTION.rst | 12 +++++++----- helpdesk_mgmt_activity/static/description/index.html | 6 +++--- helpdesk_mgmt_activity/tests/test_helpdesk_ticket.py | 1 + 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/helpdesk_mgmt_activity/README.rst b/helpdesk_mgmt_activity/README.rst index e8ea90de45..331c3fe108 100644 --- a/helpdesk_mgmt_activity/README.rst +++ b/helpdesk_mgmt_activity/README.rst @@ -30,11 +30,13 @@ Helpdesk Management Activity The module adds the following features: -- Refer a ticket to the Odoo model record -- Set the list of models available for a Helpdesk team -- Pre-configure ticket description template based on it's category -- Create an activity for the referring record right from the Ticket -- Change the Ticket's stage based on the activity state +* Link a ticket to an Odoo model record +* Set the list of available models for a Helpdesk team +* Pre-configure ticket description template based on it's category +* Create an activity for the linked record right from the Ticket +* Change the Ticket's stage based on the activity state + + **Table of contents** diff --git a/helpdesk_mgmt_activity/models/helpdesk_ticket.py b/helpdesk_mgmt_activity/models/helpdesk_ticket.py index 1c46e4140f..529ceb3175 100644 --- a/helpdesk_mgmt_activity/models/helpdesk_ticket.py +++ b/helpdesk_mgmt_activity/models/helpdesk_ticket.py @@ -141,7 +141,6 @@ def perform_action(self): date_deadline=self.date_deadline, activity_type_id=self.source_activity_type_id.id, ticket_id=self.id, - user_id=self.assigned_user_id.id, ) self.set_next_stage() except Exception as e: @@ -152,5 +151,6 @@ def perform_action(self): "params": { "type": "success", "message": _("Activity has been created!"), + "next": {"type": "ir.actions.act_window_close"}, }, } diff --git a/helpdesk_mgmt_activity/readme/DESCRIPTION.rst b/helpdesk_mgmt_activity/readme/DESCRIPTION.rst index a2eb100fb3..c7c5af9e5c 100644 --- a/helpdesk_mgmt_activity/readme/DESCRIPTION.rst +++ b/helpdesk_mgmt_activity/readme/DESCRIPTION.rst @@ -1,7 +1,9 @@ The module adds the following features: -- Refer a ticket to the Odoo model record -- Set the list of models available for a Helpdesk team -- Pre-configure ticket description template based on it's category -- Create an activity for the referring record right from the Ticket -- Change the Ticket's stage based on the activity state +* Link a ticket to an Odoo model record +* Set the list of available models for a Helpdesk team +* Pre-configure ticket description template based on it's category +* Create an activity for the linked record right from the Ticket +* Change the Ticket's stage based on the activity state + + diff --git a/helpdesk_mgmt_activity/static/description/index.html b/helpdesk_mgmt_activity/static/description/index.html index fcbe4298a8..7d1493604a 100644 --- a/helpdesk_mgmt_activity/static/description/index.html +++ b/helpdesk_mgmt_activity/static/description/index.html @@ -371,10 +371,10 @@

Helpdesk Management Activity

Beta License: AGPL-3 OCA/helpdesk Translate me on Weblate Try me on Runboat

The module adds the following features:

Table of contents

diff --git a/helpdesk_mgmt_activity/tests/test_helpdesk_ticket.py b/helpdesk_mgmt_activity/tests/test_helpdesk_ticket.py index c9c6264756..9b4abe3718 100644 --- a/helpdesk_mgmt_activity/tests/test_helpdesk_ticket.py +++ b/helpdesk_mgmt_activity/tests/test_helpdesk_ticket.py @@ -190,6 +190,7 @@ def test_perform_action(self): "params": { "type": "success", "message": "Activity has been created!", + "next": {"type": "ir.actions.act_window_close"}, }, }, )