[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:
@@ -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([
|
||||
|
||||
@@ -157,6 +157,7 @@ class SurveyInvite(models.TransientModel):
|
||||
|
||||
def _get_answers_values(self):
|
||||
return {
|
||||
'input_type': 'link',
|
||||
'deadline': self.deadline,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user