From eaafe9b9778fdfb72f3ac5e8b21d25f7d4cf5f3c Mon Sep 17 00:00:00 2001 From: FrancoisGe Date: Fri, 11 Aug 2023 07:04:48 +0000 Subject: [PATCH] [FIX] survey: answers disappear Before this commit, in a survey, opening a question, discarding it and then reopening it no longer displayed the content of the responses. How to reproduce In QuestionPageOneToManyField, we overwrite the behaviour of openRecord by reloading the record to be opened. This is no longer necessary since PR 129507 as the correct record is retrieved which already contains the updated values. How to reproduce: Go to a survey Click on a question with answers Click on discard Click on the same question Before this commit: Response data not displayed After this commit: The answer data is displayed correctly closes odoo/odoo#131662 Signed-off-by: Jorge Pinna Puissant (jpp) --- .../static/src/question_page/question_page_one2many_field.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/addons/survey/static/src/question_page/question_page_one2many_field.js b/addons/survey/static/src/question_page/question_page_one2many_field.js index edd67fa1ca0..d0d936aff86 100644 --- a/addons/survey/static/src/question_page/question_page_one2many_field.js +++ b/addons/survey/static/src/question_page/question_page_one2many_field.js @@ -102,10 +102,6 @@ class QuestionPageOneToManyField extends X2ManyField { } if (params.record) { params.record = record.data[name].records.find(r => r.resId === params.record.resId); - // Force synchronization of fields that depend on sequence - // (allowed_triggering_question_ids, is_placed_before_trigger) - // as records may have been re-ordered before opening this one. - await params.record.load(); } await openRecord(params); };