[FIX] survey: review survey answers past deadline
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) <awa@odoo.com>
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user