IMP benefit
This commit is contained in:
parent
8d3c5bb4f0
commit
d4526b497a
|
|
@ -303,7 +303,14 @@ class Visit(models.Model):
|
|||
# werkzeug.urls.url_encode({'answer_token': response.access_token})
|
||||
werkzeug.urls.url_encode({'answer_token': response and response.access_token or None})
|
||||
)
|
||||
|
||||
link_tracker = self.env['link.tracker'].sudo().create({
|
||||
'url': self.survey_url,
|
||||
'title': 'Survey Link',
|
||||
'campaign_id': False,
|
||||
'medium_id': False,
|
||||
'source_id': False,
|
||||
})
|
||||
self.survey_url = link_tracker.short_url
|
||||
if self.benefit_id.contact_type == 'email':
|
||||
if not self.benefit_id.email:
|
||||
raise UserError(_("The family profile has no email address. Please add an email first."))
|
||||
|
|
|
|||
Loading…
Reference in New Issue