[IMP] survey_event_registration_generation: survey answer display

This commit is contained in:
clementthomas
2023-09-19 15:29:51 +02:00
parent affaf785ee
commit 8b7f9c211a
2 changed files with 5 additions and 5 deletions

View File

@@ -111,7 +111,7 @@ class SurveyUserInput(models.Model):
"""After creating the lead send an internal message with the input link"""
registration.message_post_with_view(
"mail.message_origin_link",
values={"self": registration, "origin": self.survey_id},
values={"self": registration, "origin": self},
subtype_id=self.env.ref("mail.mt_note").id,
)
@@ -135,7 +135,7 @@ class SurveyUserInput(models.Model):
registration.write(vals)
registration.message_post_with_view(
"mail.message_origin_link",
values={"edit":True, "self": registration, "origin": self.survey_id},
values={"edit":True, "self": registration, "origin": user_input},
subtype_id=self.env.ref("mail.mt_note").id,
)

View File

@@ -7,9 +7,9 @@
</template>
<template id="survey_page_print" name="survey_event_registration_generation print page" inherit_id="survey.survey_page_print">
<xpath expr="//div[@role='alert']" position="before">
<t t-if="question.question_type == 'event_product'"><t t-call="survey_event_registration_generation.question_event_product"/></t>
<t t-if="question.question_type == 'event'"><t t-call="survey_event_registration_generation.question_event" /></t>
<xpath expr="//div[@role='alert']" position="before">
<t t-if="question.question_type == 'event_product'"><t t-out="answer_lines[0].value_event_product.display_name"/></t>
<t t-if="question.question_type == 'event'"><t t-out="answer_lines[0].value_event.display_name"/></t>
</xpath>
</template>