From 44ec0e66dbf78202fcbaf628a3a395a1fe11a650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20FRAN=C3=87OIS?= Date: Mon, 23 Mar 2020 15:21:09 +0100 Subject: [PATCH] [FIX] create from template --- survey_template/models/survey_survey.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/survey_template/models/survey_survey.py b/survey_template/models/survey_survey.py index 3a9280d..ac074b1 100644 --- a/survey_template/models/survey_survey.py +++ b/survey_template/models/survey_survey.py @@ -20,11 +20,11 @@ class SurveySurvey(models.Model): # ACTIONS @api.multi - def create_survey_from_template(self): + def create_survey_from_template(self, default=None): self.ensure_one() if not self.is_template: raise UserError(_("You should use the \"Copy\" secondary action to duplicate a non-template survey.")) - return self.copy() + return self.copy(default=default) @api.multi def action_send_survey(self):