[IMP] survey_event_registration_generation: survey answer display
This commit is contained in:
@@ -111,7 +111,7 @@ class SurveyUserInput(models.Model):
|
|||||||
"""After creating the lead send an internal message with the input link"""
|
"""After creating the lead send an internal message with the input link"""
|
||||||
registration.message_post_with_view(
|
registration.message_post_with_view(
|
||||||
"mail.message_origin_link",
|
"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,
|
subtype_id=self.env.ref("mail.mt_note").id,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ class SurveyUserInput(models.Model):
|
|||||||
registration.write(vals)
|
registration.write(vals)
|
||||||
registration.message_post_with_view(
|
registration.message_post_with_view(
|
||||||
"mail.message_origin_link",
|
"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,
|
subtype_id=self.env.ref("mail.mt_note").id,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -7,9 +7,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="survey_page_print" name="survey_event_registration_generation print page" inherit_id="survey.survey_page_print">
|
<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">
|
<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_product'"><t t-out="answer_lines[0].value_event_product.display_name"/></t>
|
||||||
<t t-if="question.question_type == 'event'"><t t-call="survey_event_registration_generation.question_event" /></t>
|
<t t-if="question.question_type == 'event'"><t t-out="answer_lines[0].value_event.display_name"/></t>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user