From 3e8727e2aa987750d68b4a6f4e9e48572b43e001 Mon Sep 17 00:00:00 2001
From: Xavier Morel <xmo@odoo.com>
Date: Mon, 24 Aug 2015 11:25:26 +0200
Subject: [PATCH] [FIX] crm_project_issue: one more handrolled
 ref/xmlid_to_res_id

---
 addons/crm_project_issue/project_issue.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/addons/crm_project_issue/project_issue.py b/addons/crm_project_issue/project_issue.py
index e34bb059cf09..9351e34eff66 100644
--- a/addons/crm_project_issue/project_issue.py
+++ b/addons/crm_project_issue/project_issue.py
@@ -47,7 +47,8 @@ class crm_lead_to_project_issue_wizard(osv.TransientModel):
             # delete the lead
             Lead.unlink(cr, uid, [lead.id], context=None)
         # return the action to go to the form view of the new Issue
-        view_id = self.pool.get('ir.ui.view').search(cr, uid, [('model', '=', 'project.issue'), ('name', '=', 'project_issue_form_view')])
+        view_id = self.pool['ir.model.data'].xmlid_to_res_id(
+            cr, uid, 'project_issue.project_issue_form_view', context=context)
         return {
             'name': 'Issue created',
             'view_type': 'form',
-- 
GitLab