From af6c434812bcdfa92fb83c87efdc0d805c2666d3 Mon Sep 17 00:00:00 2001 From: Patrick Hoste Date: Fri, 3 Dec 2021 16:14:56 +0000 Subject: [PATCH] [IMP] survey: open result page in new tab SPECIFICATION Before this commit, when clicking on the 'See Results' button the page was loaded on the previous one. After this commit, the page will open in a new tab. We also took the opportunity to replace all the '_blank' value occurence by the 'new' value as '_blank' value is not a valid value for the 'target' field of the 'ir.actions.act_url' model. LINKS Task-2700305 PR : odoo/odoo#80858 Signed-off-by: Thibault Delavallee (tde) --- addons/survey/models/survey_survey.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/survey/models/survey_survey.py b/addons/survey/models/survey_survey.py index 91e21f42a31..afad56de367 100644 --- a/addons/survey/models/survey_survey.py +++ b/addons/survey/models/survey_survey.py @@ -905,7 +905,7 @@ class Survey(models.Model): return { 'type': 'ir.actions.act_url', 'name': "Results of the Survey", - 'target': 'self', + 'target': 'new', 'url': '/survey/results/%s' % self.id } @@ -915,7 +915,7 @@ class Survey(models.Model): return { 'type': 'ir.actions.act_url', 'name': "Test Survey", - 'target': '_blank', + 'target': 'new', 'url': '/survey/test/%s' % self.access_token, } @@ -949,7 +949,7 @@ class Survey(models.Model): self.ensure_one() return { 'type': 'ir.actions.act_url', - 'target': '_blank', + 'target': 'new', 'url': '/survey/%s/certification_preview' % (self.id) } @@ -976,7 +976,7 @@ class Survey(models.Model): return { 'type': 'ir.actions.act_url', 'name': "Open Session Manager", - 'target': '_blank', + 'target': 'new', 'url': '/survey/session/manage/%s' % self.access_token }