From d155810c251c7d90239811eba23debbd863e816d Mon Sep 17 00:00:00 2001 From: jcoux Date: Thu, 5 Dec 2024 13:52:14 +0100 Subject: [PATCH] [FIX][17.0] helpdesk_mgmt_stage_server_action: Fix context when calling server action Because depending of where you provides into the UI, the `active_id` or `active_ids` can be already set. --- helpdesk_mgmt_stage_server_action/models/helpdesk_ticket.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helpdesk_mgmt_stage_server_action/models/helpdesk_ticket.py b/helpdesk_mgmt_stage_server_action/models/helpdesk_ticket.py index 4d0da12c93..af39931dc3 100644 --- a/helpdesk_mgmt_stage_server_action/models/helpdesk_ticket.py +++ b/helpdesk_mgmt_stage_server_action/models/helpdesk_ticket.py @@ -17,6 +17,7 @@ def create(self, vals_list): context = { "active_model": self._name, "active_id": record.id, + "active_ids": records.ids, } action.with_context(**context).run() return records @@ -33,6 +34,7 @@ def write(self, vals): if action: context = { "active_model": self._name, + "active_id": records.id, "active_ids": records.ids, } action.with_context(**context).run()