From 6baf904cc3349e03d8bb646f946b9bf9a2e4e028 Mon Sep 17 00:00:00 2001 From: Florian Charlier Date: Thu, 11 Jan 2024 18:30:58 +0100 Subject: [PATCH] [FIX] survey: review survey answers past deadline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reproduce the bug: 1. Create a survey and share it with someone with a deadline 2. Complete the survey as that someone 3. Change the deadline of the answers to a date in the past (simulates reviewing later on) 4. Go to the participation record and try "Print" Issue: You are denied access to review the answers because the deadline is in the past. Fix: Do not check deadline for reviewing/printing answers. This deadline is only a limit for answering the survey. Task-3680802 closes odoo/odoo#150793 X-original-commit: 8f4c5c85c9bc194b4fec9698753db4cc84a08a90 Signed-off-by: Warnon Aurélien (awa) --- addons/survey/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/survey/controllers/main.py b/addons/survey/controllers/main.py index add47d98f61..b9ee8f94df6 100644 --- a/addons/survey/controllers/main.py +++ b/addons/survey/controllers/main.py @@ -635,7 +635,7 @@ class Survey(http.Controller): access_data = self._get_access_data(survey_token, answer_token, ensure_token=False, check_partner=False) if access_data['validity_code'] is not True and ( access_data['has_survey_access'] or - access_data['validity_code'] not in ['token_required', 'survey_closed', 'survey_void']): + access_data['validity_code'] not in ['token_required', 'survey_closed', 'survey_void', 'answer_deadline']): return self._redirect_with_error(access_data, access_data['validity_code']) survey_sudo, answer_sudo = access_data['survey_sudo'], access_data['answer_sudo']