From 120ff4a1db2269431ebaa33deb4428504daf6be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Warnon?= Date: Mon, 4 Feb 2019 07:19:37 +0000 Subject: [PATCH] [FIX] survey: make survey access_token copy=False for duplicate Task #1902306 Purpose ======= The "access_token" needs to be unique so it should not be copied when duplicating the survey. --- addons/survey/models/survey_survey.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/survey/models/survey_survey.py b/addons/survey/models/survey_survey.py index a08f735bd82..e486ef9a41c 100644 --- a/addons/survey/models/survey_survey.py +++ b/addons/survey/models/survey_survey.py @@ -61,7 +61,7 @@ class Survey(models.Model): ('public', 'Anyone with the link'), ('token', 'Invited people only')], string='Access Mode', default='public', required=True) - access_token = fields.Char('Access Token', default=lambda self: self._get_default_access_token()) + access_token = fields.Char('Access Token', default=lambda self: self._get_default_access_token(), copy=False) users_login_required = fields.Boolean('Login required', help="If checked, users have to login before answering even with a valid token.") users_can_go_back = fields.Boolean('Users can go back', help="If checked, users can go back to previous pages.") users_can_signup = fields.Boolean('Users can signup', compute='_compute_users_can_signup')