[IMP] website_event_questions: improve demo data to showcase 'free_text' questions

This commit improves the demo data of the event application by adding a few
questions to better showcase the new 'free text question' feature.

LINKS

PR #45497
Task ID 2189529
This commit is contained in:
Aurélien Warnon
2020-03-31 10:39:05 +00:00
parent 7b79c3244d
commit 6d2bee710d
2 changed files with 68 additions and 17 deletions
@@ -20,22 +20,50 @@
<!-- EVENT SPECIFIC -->
<record id="event_0_question_0" model="event.question">
<field name="title">Meal Type</field>
<field name="question_type">simple_choice</field>
<field name="once_per_order" eval="False"/>
<field name="event_id" ref="event.event_0"/>
</record>
<record id="event_0_question_0_answer_0" model="event.answer">
<record id="event_0_question_0_answer_0" model="event.question.answer">
<field name="name">Mixed</field>
<field name="sequence">1</field>
<field name="question_id" ref="website_event_questions.event_0_question_0"/>
</record>
<record id="event_0_question_0_answer_1" model="event.answer">
<record id="event_0_question_0_answer_1" model="event.question.answer">
<field name="name">Vegetarian</field>
<field name="sequence">2</field>
<field name="question_id" ref="website_event_questions.event_0_question_0"/>
</record>
<record id="event_0_question_0_answer_2" model="event.answer">
<record id="event_0_question_0_answer_2" model="event.question.answer">
<field name="name">Pastafarian</field>
<field name="sequence">3</field>
<field name="question_id" ref="website_event_questions.event_0_question_0"/>
</record>
<record id="event_0_question_1" model="event.question">
<field name="title">Allergies</field>
<field name="question_type">text_box</field>
<field name="once_per_order" eval="False"/>
<field name="event_id" ref="event.event_0"/>
</record>
<record id="event_0_question_2" model="event.question">
<field name="title">How did you learn about this event?</field>
<field name="question_type">simple_choice</field>
<field name="once_per_order" eval="True"/>
<field name="event_id" ref="event.event_0"/>
</record>
<record id="event_0_question_2_answer_0" model="event.question.answer">
<field name="name">Our website</field>
<field name="sequence">1</field>
<field name="question_id" ref="website_event_questions.event_0_question_2"/>
</record>
<record id="event_0_question_2_answer_1" model="event.question.answer">
<field name="name">Commercials</field>
<field name="sequence">2</field>
<field name="question_id" ref="website_event_questions.event_0_question_2"/>
</record>
<record id="event_0_question_2_answer_2" model="event.question.answer">
<field name="name">A friend</field>
<field name="sequence">3</field>
<field name="question_id" ref="website_event_questions.event_0_question_2"/>
</record>
</data></odoo>
@@ -1,18 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo><data>
<record id="event.event_registration_0_0" model="event.registration">
<field name="answer_ids" eval="[
(5, 0),
(4, ref('website_event_questions.event_0_question_0_answer_0'))]"/>
<odoo>
<data>
<record id="event_registration_0_0_registration_answer_0" model="event.registration.answer">
<field name="value_answer_id" ref="website_event_questions.event_0_question_0_answer_0" />
<field name="question_id" ref="website_event_questions.event_0_question_0" />
<field name="registration_id" ref="event.event_registration_0_0" />
</record>
<record id="event.event_registration_0_1" model="event.registration">
<field name="answer_ids" eval="[
(5, 0),
(4, ref('website_event_questions.event_0_question_0_answer_1'))]"/>
<record id="event_registration_0_0_registration_answer_1" model="event.registration.answer">
<field name="value_text_box">Fish
Nuts</field>
<field name="question_id" ref="website_event_questions.event_0_question_1" />
<field name="registration_id" ref="event.event_registration_0_0" />
</record>
<record id="event.event_registration_0_2" model="event.registration">
<field name="answer_ids" eval="[
(5, 0),
(4, ref('website_event_questions.event_0_question_0_answer_2'))]"/>
<record id="event_registration_0_0_registration_answer_2" model="event.registration.answer">
<field name="value_answer_id" ref="website_event_questions.event_0_question_2_answer_0" />
<field name="question_id" ref="website_event_questions.event_0_question_2" />
<field name="registration_id" ref="event.event_registration_0_0" />
</record>
</data></odoo>
<record id="event_registration_0_1_registration_answer_0" model="event.registration.answer">
<field name="value_answer_id" ref="website_event_questions.event_0_question_0_answer_1" />
<field name="question_id" ref="website_event_questions.event_0_question_0" />
<field name="registration_id" ref="event.event_registration_0_1" />
</record>
<record id="event_registration_0_1_registration_answer_1" model="event.registration.answer">
<field name="value_answer_id" ref="website_event_questions.event_0_question_2_answer_0" />
<field name="question_id" ref="website_event_questions.event_0_question_2" />
<field name="registration_id" ref="event.event_registration_0_1" />
</record>
<record id="event_registration_0_2_registration_answer_0" model="event.registration.answer">
<field name="value_answer_id" ref="website_event_questions.event_0_question_0_answer_2" />
<field name="question_id" ref="website_event_questions.event_0_question_0" />
<field name="registration_id" ref="event.event_registration_0_2" />
</record>
<record id="event_registration_0_2_registration_answer_1" model="event.registration.answer">
<field name="value_answer_id" ref="website_event_questions.event_0_question_2_answer_2" />
<field name="question_id" ref="website_event_questions.event_0_question_2" />
<field name="registration_id" ref="event.event_registration_0_2" />
</record>
</data>
</odoo>