From 59aa5f7c0ef42e67343b260e5324d53ef900816d Mon Sep 17 00:00:00 2001 From: Thibault Francois Date: Thu, 21 Oct 2021 12:04:44 +0000 Subject: [PATCH] [FIX] survey: question not define in survey.layout on print route How to reproduce issue ----------------------- - Create a survey with more than one question - Layout: One page per question - Complete a first survey - Start a second survey but don't finish it - Click on see result - Click on the answer of the uncompleted answer you got a traceback 'NoneType' object has no attribute 'id' Node: Why this is happening ? ----------------------- question is define in survey_page_print template inside a foreach. The scope of question thus is limited to this foreach. Solution -------- Declare question before the foreach in a t-set closes odoo/odoo#80648 X-original-commit: d80ec72696010d668047c8fb1d9665f6aa1b2ee6 Signed-off-by: Thibault Delavallee (tde) --- addons/survey/views/survey_templates_print.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/survey/views/survey_templates_print.xml b/addons/survey/views/survey_templates_print.xml index 8d5457bdd51..5ca8fb5cbbc 100644 --- a/addons/survey/views/survey_templates_print.xml +++ b/addons/survey/views/survey_templates_print.xml @@ -15,6 +15,7 @@
+