[ADD] survey_contact_generation, survey_event_registration_generation
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="survey_question_form" model="ir.ui.view">
|
||||
<field name="model">survey.question</field>
|
||||
<field name="inherit_id" ref="survey.survey_question_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='comments_allowed']/.." position="after">
|
||||
<group name="event_registration" string="Event registration">
|
||||
<field name="event_product_question_id" options="{'no_open': True, 'no_create': True}"
|
||||
attrs="{'invisible': [('question_type','!=','event')]}" />
|
||||
<!-- <field name="allowed_field_ids" invisible="1" /> -->
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
@@ -0,0 +1,43 @@
|
||||
<odoo>
|
||||
<template id="question_container" name="survey_event_registration_generation question container" inherit_id="survey.question_container">
|
||||
<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>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<template id="question_event_product" name="Question: event product">
|
||||
<div class="o_survey_comment_container p-0">
|
||||
<select t-att-name="question.id" t-att-placeholder="question.question_placeholder" t-att-data-question-type="question.question_type">
|
||||
<t t-foreach="event_products" t-as="event_product">
|
||||
<option
|
||||
t-att-value="event_product.id"
|
||||
t-att-selected="answer_lines and (answer_lines[0].value_event_product.id == event_product.id)">
|
||||
<t t-esc="event_product.name"/></option>
|
||||
</t>
|
||||
</select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="question_event" name="Question: event">
|
||||
<div class="o_survey_comment_container p-0">
|
||||
<select t-att-name="question.id" t-att-placeholder="question.question_placeholder" t-att-data-question-type="question.question_type">
|
||||
<t t-foreach="events" t-as="event">
|
||||
<option
|
||||
t-att-value="event.id"
|
||||
t-att-selected="answer_lines and (answer_lines[0].value_event.id == event.id)">
|
||||
<t t-esc="event.name"/></option>
|
||||
</t>
|
||||
</select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
</odoo>
|
@@ -0,0 +1,17 @@
|
||||
<odoo>
|
||||
<!-- Inherit Form View -->
|
||||
<record id="survey_event_registration_generation_inherit_survey_user_input_line_form"
|
||||
model="ir.ui.view">
|
||||
<field name="name">user.input.value.event.product</field>
|
||||
<field name="model">survey.user_input.line</field>
|
||||
<field name="inherit_id" ref="survey.survey_user_input_line_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='answer_type']" position="after">
|
||||
<field name="value_event"/>
|
||||
<field name="value_event_product" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
Reference in New Issue
Block a user