From 17482b4d7dc233431dae9a460aa4934bfdf37d68 Mon Sep 17 00:00:00 2001
From: migodoo <jordan>
Date: Thu, 19 May 2022 15:00:49 +0200
Subject: [PATCH] [fix] use _for_xml_id to read ir_actions

---
 .pre-commit-config.yaml                          | 1 +
 wizard/partner_dashboard_dlg_selection_wizard.py | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1c6434b..6994ef3 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -49,6 +49,7 @@ repos:
     rev: 20.8b1
     hooks:
       - id: black
+        additional_dependencies: ["click==8.0.4"]
   - repo: https://github.com/pre-commit/mirrors-prettier
     rev: v2.1.2
     hooks:
diff --git a/wizard/partner_dashboard_dlg_selection_wizard.py b/wizard/partner_dashboard_dlg_selection_wizard.py
index fa9b611..bf8f95d 100644
--- a/wizard/partner_dashboard_dlg_selection_wizard.py
+++ b/wizard/partner_dashboard_dlg_selection_wizard.py
@@ -28,9 +28,9 @@ class ScopPartnerDashboardDlgSelectiontWizard(models.TransientModel):
     # ....................................................................................
     @api.model
     def action_open_wizard_selection(self):
-        action = self.env.ref(
+        action = self.env["ir.actions.actions"]._for_xml_id(
             "cgscop_partner_dashboard.scop_partner_dashboard_dlg_selection_act"
-        ).read()[0]
+        )
         return action
 
     # ....................................................................................
-- 
GitLab