[FIX] survey: correctly flag answers done with invite

A field exists to differentiate answers done manually through frontend of
survey and answers created through invitation. The field was not correctly
set by the invite wizard. This commit fixes it.

This commit is linked to task ID 1935176 and PR #30689.
This commit is contained in:
Thibault Delavallée
2019-01-31 11:53:38 +00:00
parent c7b24e6831
commit 35df807db8
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ class SurveyUserInput(models.Model):
# description
survey_id = fields.Many2one('survey.survey', string='Survey', required=True, readonly=True, ondelete='cascade')
input_type = fields.Selection([
('manually', 'Manually'), ('link', 'Link')],
('manually', 'Manual'), ('link', 'Invitation')],
string='Answer Type', default='manually', required=True, readonly=True,
oldname="type")
state = fields.Selection([
+1
View File
@@ -157,6 +157,7 @@ class SurveyInvite(models.TransientModel):
def _get_answers_values(self):
return {
'input_type': 'link',
'deadline': self.deadline,
}