Skip to content

Commit

Permalink
[FIX] crm_survey: survey creation
Browse files Browse the repository at this point in the history
Same issue as here odoo/odoo#38779

closes #505

Signed-off-by: Juan José Scarafía <jjs@adhoc.com.ar>
  • Loading branch information
jjscarafia committed Feb 18, 2022
1 parent 7df77d1 commit 30f7f88
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crm_survey/models/crm_applicant.py
Expand Up @@ -18,9 +18,7 @@ def action_start_survey(self):
if not self.response_id:
# use link as type in order to avoid deletion of records
# that they wasn't started yet made by 'do_clean_emptys' method
response = self.env['survey.user_input'].with_context(default_type="link").create(
{'survey_id': self.survey_id.id,
'partner_id': self.partner_id.id})
response = self.survey_id.with_context(default_input_type="link")._create_answer(partner=self.partner_id)
self.response_id = response.id
else:
response = self.response_id
Expand Down

0 comments on commit 30f7f88

Please sign in to comment.