[IMP] website_slides{_*}: improve demo data

PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

Add some demo data to allow demonstrating various flows: training, lessons,
public, private, quizzes, ...

Also prepare future test tours by improving courses that will be used for
tours, notably the public one.

LINKS

Task ID 1937768
This commit is contained in:
Thibault Delavallée
2019-08-28 13:27:59 +00:00
parent 5862f1d91f
commit e9a5dcff74
18 changed files with 145 additions and 39 deletions
@@ -1,17 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo><data noupdate="1">
<!-- CHANNEL 6: DIY Furniture -->
<!-- ================================================== -->
<record id="product_course" model="product.product">
<field name="name">DIY Furniture Course</field>
<field name="standard_price">100.0</field>
<field name="list_price">100.0</field>
<field name="type">service</field>
<field name="is_published" eval="True"/>
<field name="image_1920" type="base64" file="website_sale_slides/static/img/product_course.png"/>
</record>
<!-- CHANNEL 1: Taking care of Trees -->
<!-- ================================================== -->
<record id="product_course_channel_1_option_0" model="product.product">
@@ -32,7 +20,7 @@
<field name="image_1920" type="base64" file="website_sale_slides/static/img/flower_pot.jpg"/>
</record>
<record id="product_course_demo_1" model="product.product">
<record id="product_course_channel_1" model="product.product">
<field name="name">Taking care of Trees Course</field>
<field name="standard_price">150.0</field>
<field name="list_price">150.0</field>
@@ -41,6 +29,16 @@
<field name="image_1920" type="base64" file="website_sale_slides/static/img/channel_demo_tree_1.jpg"/>
</record>
<!-- CHANNEL 6: DIY Furniture -->
<!-- ================================================== -->
<record id="product_course_channel_6" model="product.product">
<field name="name">DIY Furniture Course</field>
<field name="standard_price">100.0</field>
<field name="list_price">100.0</field>
<field name="type">service</field>
<field name="is_published" eval="True"/>
<field name="image_1920" type="base64" file="website_sale_slides/static/img/product_course.png"/>
</record>
<!-- TBE: This need to be fixed, `optional_product_ids` is a field defined in `sale_product_configurator` which is not defined as a dependency -->
<!-- <record id="product_course_demo_1_product_template" model="product.template">
@@ -18,8 +18,8 @@
</record>
<record id="sale_order_course_1_line_1" model="sale.order.line">
<field name="order_id" ref="sale_order_course_1"/>
<field name="name" model="sale.order.line" eval="obj().env.ref('website_sale_slides.product_course').get_product_multiline_description_sale()"/>
<field name="product_id" ref="website_sale_slides.product_course"/>
<field name="name" model="sale.order.line" eval="obj().env.ref('website_sale_slides.product_course_channel_6').get_product_multiline_description_sale()"/>
<field name="product_id" ref="website_sale_slides.product_course_channel_6"/>
<field name="product_uom_qty">1</field>
<field name="product_uom" ref="uom.product_uom_unit"/>
<field name="price_unit">100.0</field>
@@ -39,8 +39,8 @@
</record>
<record id="sale_order_course_2_line_1" model="sale.order.line">
<field name="order_id" ref="sale_order_course_2"/>
<field name="name" model="sale.order.line" eval="obj().env.ref('website_sale_slides.product_course').get_product_multiline_description_sale()"/>
<field name="product_id" ref="website_sale_slides.product_course"/>
<field name="name" model="sale.order.line" eval="obj().env.ref('website_sale_slides.product_course_channel_6').get_product_multiline_description_sale()"/>
<field name="product_id" ref="website_sale_slides.product_course_channel_6"/>
<field name="product_uom_qty">1</field>
<field name="product_uom" ref="uom.product_uom_unit"/>
<field name="price_unit">100.0</field>
+7 -11
View File
@@ -1,20 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo><data noupdate="1">
<!-- CHANNEL 1: Taking care of Trees -->
<!-- ================================================== -->
<record id="website_slides.slide_channel_demo_1_gard1" model="slide.channel">
<field name="enroll">payment</field>
<field name="product_id" ref="product_course_channel_1"/>
</record>
<!-- CHANNEL 6: DIY Furniture -->
<!-- ================================================== -->
<record id="website_slides.slide_channel_demo_6_furn3" model="slide.channel">
<field name="enroll">payment</field>
<field name="product_id" ref="product_course"/>
<field name="product_id" ref="product_course_channel_6"/>
</record>
<!-- CHANNEL 1: Taking care of Trees -->
<!-- ================================================== -->
<record id="website_slides.slide_channel_demo_1_gard1" model="slide.channel">
<field name="enroll">payment</field>
<field name="product_id" ref="product_course_demo_1"/>
</record>
</data></odoo>
@@ -11,12 +11,14 @@
<field name="tag_ids" eval="[(5, 0),
(4, ref('website_slides.slide_channel_tag_level_basic')),
(4, ref('website_slides.slide_channel_tag_role_gardener')),
(4, ref('website_slides.slide_channel_tag_other_0')),
(4, ref('website_slides.slide_channel_tag_other_2'))]"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_gardening.jpg"/>
<field name="description">Learn the basics of gardening !</field>
<field name="create_date" eval="DateTime.now() - relativedelta(days=8)"/>
</record>
<!-- This channel will be set on payment -->
<record id="slide_channel_demo_1_gard1" model="slide.channel">
<field name="name">Taking care of Trees</field>
<field name="enroll">public</field>
@@ -46,7 +48,7 @@
(4, ref('website_slides.slide_channel_tag_role_carpenter')),
(4, ref('website_slides.slide_channel_tag_other_0')),
(4, ref('website_slides.slide_channel_tag_other_2'))]"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_flowers.jpg"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_gardening_3.jpg"/>
<field name="description">A lot of nice documentation: trees, wood, gardens. A gold mine for references.</field>
<field name="create_date" eval="DateTime.now() - relativedelta(days=6)"/>
</record>
@@ -80,7 +82,7 @@ will learn the basics of wood characteristics.</field>
<field name="tag_ids" eval="[(5, 0),
(4, ref('website_slides.slide_channel_tag_level_basic')),
(4, ref('website_slides.slide_channel_tag_role_furniture'))]"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_furniture_2.jpg"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_furniture.jpg"/>
<field name="description">If you are looking for technical specifications, have a look at this documentation.</field>
<field name="create_date" eval="DateTime.now() - relativedelta(days=4)"/>
</record>
@@ -97,7 +99,7 @@ will learn the basics of wood characteristics.</field>
(4, ref('website_slides.slide_channel_tag_role_furniture')),
(4, ref('website_slides.slide_channel_tag_other_0')),
(4, ref('website_slides.slide_channel_tag_other_1'))]"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_furniture.jpg"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_furniture_2.jpg"/>
<field name="description">All you need to know about furniture creation.</field>
<field name="create_date" eval="DateTime.now() - relativedelta(days=3)"/>
</record>
@@ -115,7 +117,7 @@ will learn the basics of wood characteristics.</field>
(4, ref('website_slides.slide_channel_tag_role_carpenter')),
(4, ref('website_slides.slide_channel_tag_role_furniture')),
(4, ref('website_slides.slide_channel_tag_other_1'))]"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_diy.jpg"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_furniture_3.jpg"/>
<field name="description">So much amazing certification.</field>
<field name="create_date" eval="DateTime.now() - relativedelta(days=2)"/>
</record>
+115 -5
View File
@@ -4,7 +4,7 @@
<!-- CHANNEL 0: Basics of Gardening -->
<!-- ================================================== -->
<record id="slide_slide_demo_0_0" model="slide.slide">
<field name="name">Know-How Summary</field>
<field name="name">Gardening: The Know-How</field>
<field name="sequence">1</field>
<field name="datas" type="base64" file="website_slides/static/src/img/presentation.pdf"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel-training-default.jpg"/>
@@ -15,7 +15,7 @@
<field name="public_views">10</field>
<field name="completion_time">2.5</field>
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_tools')), (4, ref('website_slides.slide_tag_demo_howto'))]"/>
<field name="description">A summary of know-how: how and what.</field>
<field name="description">A summary of know-how: how and what. All the basics for this course about gardening.</field>
</record>
<record id="slide_slide_demo_0_1" model="slide.slide">
<field name="name">Home Gardening</field>
@@ -30,6 +30,93 @@
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorful')), (4, ref('website_slides.slide_tag_demo_theory'))]"/>
<field name="description">Interesting informations about home gardening. Keep it close !</field>
</record>
<record id="slide_slide_demo_0_2" model="slide.slide">
<field name="name">Mighty Carrots</field>
<field name="sequence">3</field>
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_gardening_2.jpg"/>
<field name="slide_type">infographic</field>
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
<field name="is_published" eval="True"/>
<field name="is_preview" eval="False"/>
<field name="public_views">2</field>
<field name="completion_time">2</field>
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorful')), (4, ref('website_slides.slide_tag_demo_theory'))]"/>
<field name="description">You won't believe those facts about carrots.</field>
</record>
<record id="slide_slide_demo_0_2" model="slide.slide">
<field name="name">Mighty Carrots</field>
<field name="sequence">3</field>
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_gardening_2.jpg"/>
<field name="slide_type">infographic</field>
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
<field name="is_published" eval="True"/>
<field name="is_preview" eval="False"/>
<field name="public_views">2</field>
<field name="completion_time">2</field>
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorful')), (4, ref('website_slides.slide_tag_demo_theory'))]"/>
<field name="description">You won't believe those facts about carrots.</field>
</record>
<record id="slide_slide_demo_0_3" model="slide.slide">
<field name="name">How to Grow and Harvest The Best Strawberries | Gardening Tips and Tricks</field>
<field name="sequence">4</field>
<field name="url">https://www.youtube.com/watch?v=l0JZ25VvbwE</field>
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_thumb_l0JZ25VvbwE.jpg"/>
<field name="document_id">l0JZ25VvbwE</field>
<field name="slide_type">video</field>
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
<field name="is_published" eval="True"/>
<field name="is_preview" eval="False"/>
<field name="public_views">0</field>
<field name="completion_time">1</field>
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_howto'))]"/>
<field name="description">Here is How to get the Sweetest Strawberries you ever tasted!</field>
</record>
<record id="slide_slide_demo_0_4" model="slide.slide">
<field name="name">Test your knowledge</field>
<field name="sequence">5</field>
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_owl.jpg"/>
<field name="slide_type">quiz</field>
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
<field name="is_published" eval="True"/>
<field name="is_preview" eval="False"/>
<field name="public_views">0</field>
<field name="completion_time">1</field>
<field name="description">Show your newly mastered knowledge !</field>
</record>
<record id="slide_slide_demo_0_4_question_0" model="slide.question">
<field name="question">What is a strawberry ?</field>
<field name="slide_id" ref="slide_slide_demo_0_4"/>
</record>
<record id="slide_slide_demo_0_4_question_0_0" model="slide.answer">
<field name="text_value">A fruit</field>
<field name="is_correct" eval="True"/>
<field name="question_id" ref="slide_slide_demo_0_4_question_0"/>
</record>
<record id="slide_slide_demo_0_4_question_0_1" model="slide.answer">
<field name="text_value">A vegetable</field>
<field name="is_correct" eval="False"/>
<field name="question_id" ref="slide_slide_demo_0_4_question_0"/>
</record>
<record id="slide_slide_demo_0_4_question_0_2" model="slide.answer">
<field name="text_value">A table</field>
<field name="is_correct" eval="False"/>
<field name="question_id" ref="slide_slide_demo_0_4_question_0"/>
</record>
<record id="slide_slide_demo_0_4_question_1" model="slide.question">
<field name="question">What is the best tool to dig a hole for your plants ?</field>
<field name="slide_id" ref="slide_slide_demo_0_4"/>
</record>
<record id="slide_slide_demo_0_4_question_1_0" model="slide.answer">
<field name="text_value">A shovel</field>
<field name="is_correct" eval="True"/>
<field name="question_id" ref="slide_slide_demo_0_4_question_1"/>
</record>
<record id="slide_slide_demo_0_4_question_1_1" model="slide.answer">
<field name="text_value">A spoon</field>
<field name="is_correct" eval="False"/>
<field name="question_id" ref="slide_slide_demo_0_4_question_1"/>
</record>
<!-- CHANNEL 1: Taking care of Trees -->
<!-- ================================================== -->
@@ -237,6 +324,7 @@
</record>
<!-- Slides -->
<!-- Category: Trees -->
<record id="slide_slide_demo_2_0" model="slide.slide">
<field name="name">Main Trees Categories</field>
<field name="sequence">1</field>
@@ -253,18 +341,20 @@
<field name="quiz_second_attempt_reward">75</field>
<field name="quiz_third_attempt_reward">50</field>
<field name="quiz_fourth_attempt_reward">25</field>
<field name="description">A summary of know-how: how and what.</field>
<field name="description">A summary of know-how: what are the main trees categories and how to differentiate them.</field>
</record>
<!-- LINKS -->
<record id="slide_slide_demo_2_0_link_0" model="slide.slide.link">
<field name="name">Trees Classification Link 1</field>
<field name="name">Trees Classification Link</field>
<field name="link">http://www.example.com</field>
<field name="slide_id" ref="slide_slide_demo_2_0"/>
</record>
<record id="slide_slide_demo_2_0_link_1" model="slide.slide.link">
<field name="name">Trees Classification Link 2</field>
<field name="name">Main types of trees Link</field>
<field name="link">http://www.example.com</field>
<field name="slide_id" ref="slide_slide_demo_2_0"/>
</record>
<!-- QUIZZ -->
<record id="slide_slide_demo_2_0_question_0" model="slide.question">
<field name="question">Do you make beams out of lemon trees ?</field>
<field name="slide_id" ref="slide_slide_demo_2_0"/>
@@ -361,6 +451,26 @@
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_howto'))]"/>
<field name="description">How to wall decorating by tree planting in hanging plastic bottles.</field>
</record>
<!-- Category: Wood -->
<record id="slide_slide_demo_2_3" model="slide.slide">
<field name="name">Wood Characteristics</field>
<field name="sequence">5</field>
<field name="datas" type="base64" file="website_slides/static/src/img/presentation.pdf"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel-documentation-default.jpg"/>
<field name="slide_type">presentation</field>
<field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/>
<field name="is_published" eval="True"/>
<field name="is_preview" eval="False"/>
<field name="public_views">0</field>
<field name="completion_time">2</field>
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_cheatsheet'))]"/>
<field name="quiz_first_attempt_reward">100</field>
<field name="quiz_second_attempt_reward">75</field>
<field name="quiz_third_attempt_reward">50</field>
<field name="quiz_fourth_attempt_reward">25</field>
<field name="description">Knowing wood characteristics is a requirement in order to know which kind of wood to use in a given situation.</field>
</record>
<!-- CHANNEL 3: Choose your wood ! -->
<!-- ======================================= -->
Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

@@ -6,7 +6,7 @@
<record id="slide_slide_demo_5_4" model="slide.slide">
<field name="name">Furniture Creation Certification</field>
<field name="sequence">7</field>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_furniture.jpg"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_furniture.jpg"/>
<field name="slide_type">certification</field>
<field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/>
<field name="category_id" ref="website_slides.slide_category_demo_5_0"/>
@@ -21,7 +21,7 @@
<record id="slide_slide_demo_6_0" model="slide.slide">
<field name="name">DIY Furniture Certification</field>
<field name="sequence">1</field>
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_furniture_3.jpg"/>
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_furniture.jpg"/>
<field name="slide_type">certification</field>
<field name="channel_id" ref="website_slides.slide_channel_demo_6_furn3"/>
<field name="category_id" eval="False"/>