Browse Source

[FIX] create from template

12.0
Rémi FRANÇOIS 5 years ago
parent
commit
44ec0e66db
  1. 4
      survey_template/models/survey_survey.py

4
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):

Loading…
Cancel
Save