Начальное наполнение
This commit is contained in:
parent
e493e0363b
commit
d408db8793
7
__init__.py
Normal file
7
__init__.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from . import controllers
|
||||||
|
from . import models
|
||||||
|
from . import populate
|
||||||
|
from . import wizard
|
202
__manifest__.py
Normal file
202
__manifest__.py
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
{
|
||||||
|
'name': 'eLearning',
|
||||||
|
'version': '2.7',
|
||||||
|
'sequence': 125,
|
||||||
|
'summary': 'Manage and publish an eLearning platform',
|
||||||
|
'website': 'https://www.odoo.com/app/elearning',
|
||||||
|
'category': 'Website/eLearning',
|
||||||
|
'description': """
|
||||||
|
Create Online Courses
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Featuring
|
||||||
|
|
||||||
|
* Integrated course and lesson management
|
||||||
|
* Fullscreen navigation
|
||||||
|
* Support Youtube videos, Google documents, PDF, images, articles
|
||||||
|
* Test knowledge with quizzes
|
||||||
|
* Filter and Tag
|
||||||
|
* Statistics
|
||||||
|
""",
|
||||||
|
'depends': [
|
||||||
|
'portal_rating',
|
||||||
|
'website',
|
||||||
|
'website_mail',
|
||||||
|
'website_profile',
|
||||||
|
],
|
||||||
|
'data': [
|
||||||
|
'security/website_slides_security.xml',
|
||||||
|
'security/ir.model.access.csv',
|
||||||
|
'views/gamification_karma_tracking_views.xml',
|
||||||
|
'views/res_config_settings_views.xml',
|
||||||
|
'views/res_partner_views.xml',
|
||||||
|
'views/rating_rating_views.xml',
|
||||||
|
'views/slide_embed_views.xml',
|
||||||
|
'views/slide_question_views.xml',
|
||||||
|
'views/slide_slide_partner_views.xml',
|
||||||
|
'views/slide_slide_views.xml',
|
||||||
|
'views/slide_channel_partner_views.xml',
|
||||||
|
'views/slide_channel_views.xml',
|
||||||
|
'views/slide_channel_tag_views.xml',
|
||||||
|
'views/slide_snippets.xml',
|
||||||
|
'views/website_slides_menu_views.xml',
|
||||||
|
'views/website_slides_templates_homepage.xml',
|
||||||
|
'views/website_slides_templates_course.xml',
|
||||||
|
'views/website_slides_templates_lesson.xml',
|
||||||
|
'views/website_slides_templates_lesson_fullscreen.xml',
|
||||||
|
'views/website_slides_templates_lesson_embed.xml',
|
||||||
|
'views/website_slides_templates_profile.xml',
|
||||||
|
'views/website_slides_templates_utils.xml',
|
||||||
|
'views/website_pages_views.xml',
|
||||||
|
'views/slide_channel_add.xml',
|
||||||
|
'wizard/slide_channel_invite_views.xml',
|
||||||
|
'data/gamification_data.xml',
|
||||||
|
'data/mail_activity_type_data.xml',
|
||||||
|
'data/mail_message_subtype_data.xml',
|
||||||
|
'data/mail_template_data.xml',
|
||||||
|
'data/mail_templates.xml',
|
||||||
|
'data/slide_data.xml',
|
||||||
|
'data/website_data.xml',
|
||||||
|
],
|
||||||
|
'demo': [
|
||||||
|
'data/res_users_demo.xml',
|
||||||
|
'data/slide_channel_tag_demo.xml',
|
||||||
|
'data/slide_channel_demo.xml',
|
||||||
|
'data/slide_slide_demo.xml',
|
||||||
|
'data/slide_user_demo.xml',
|
||||||
|
'data/slide_user_gamification_demo.xml',
|
||||||
|
],
|
||||||
|
'installable': True,
|
||||||
|
'application': True,
|
||||||
|
'assets': {
|
||||||
|
'web.assets_backend': [
|
||||||
|
'website_slides/static/src/activity/**/*',
|
||||||
|
'website_slides/static/src/slide_category_one2many_field.js',
|
||||||
|
'website_slides/static/src/slide_category_list_renderer.js',
|
||||||
|
'website_slides/static/src/scss/slide_views.scss',
|
||||||
|
'website_slides/static/src/js/tours/slides_tour.js',
|
||||||
|
'website_slides/static/src/js/components/**/*.js',
|
||||||
|
'website_slides/static/src/views/**/*.js',
|
||||||
|
'website_slides/static/src/views/**/*.xml',
|
||||||
|
],
|
||||||
|
'web.assets_frontend': [
|
||||||
|
'website_slides/static/src/scss/website_slides.scss',
|
||||||
|
'website_slides/static/src/scss/website_slides_profile.scss',
|
||||||
|
'website_slides/static/src/scss/slides_slide_fullscreen.scss',
|
||||||
|
'website_slides/static/src/js/slides.js',
|
||||||
|
'website_slides/static/src/js/slides_share.js',
|
||||||
|
'website_slides/static/src/js/slides_upload.js',
|
||||||
|
'website_slides/static/src/js/slides_category_add.js',
|
||||||
|
'website_slides/static/src/js/slides_category_delete.js',
|
||||||
|
'website_slides/static/src/js/slides_slide_archive.js',
|
||||||
|
'website_slides/static/src/js/slides_slide_toggle_is_preview.js',
|
||||||
|
'website_slides/static/src/js/slides_slide_like.js',
|
||||||
|
'website_slides/static/src/js/slides_course_page.js',
|
||||||
|
'website_slides/static/src/js/slides_course_slides_list.js',
|
||||||
|
'website_slides/static/src/js/slides_course_fullscreen_player.js',
|
||||||
|
'website_slides/static/src/js/slides_course_join.js',
|
||||||
|
'website_slides/static/src/js/slides_course_enroll_email.js',
|
||||||
|
'website_slides/static/src/js/slides_course_prerequisite.js',
|
||||||
|
'website_slides/static/src/js/slides_course_quiz.js',
|
||||||
|
'website_slides/static/src/js/slides_course_quiz_question_form.js',
|
||||||
|
'website_slides/static/src/js/slides_course_quiz_finish.js',
|
||||||
|
'website_slides/static/src/js/slides_course_tag_add.js',
|
||||||
|
'website_slides/static/src/js/slides_course_unsubscribe.js',
|
||||||
|
'website_slides/static/src/js/portal_chatter.js',
|
||||||
|
'website_slides/static/src/xml/website_slides_sidebar.xml',
|
||||||
|
'website_slides/static/src/xml/website_slides_upload.xml',
|
||||||
|
'website_slides/static/src/xml/website_slides_fullscreen.xml',
|
||||||
|
'website_slides/static/src/xml/website_slides_share.xml',
|
||||||
|
'website_slides/static/src/xml/website_slides_channel_tag.xml',
|
||||||
|
'website_slides/static/src/xml/slide_management.xml',
|
||||||
|
'website_slides/static/src/xml/slide_course_join.xml',
|
||||||
|
'website_slides/static/src/xml/slide_course_prerequisite.xml',
|
||||||
|
'website_slides/static/src/xml/slide_quiz_create.xml',
|
||||||
|
'website_slides/static/src/xml/slide_quiz.xml',
|
||||||
|
'website_slides/static/src/js/public/**/*',
|
||||||
|
],
|
||||||
|
'website.assets_editor': [
|
||||||
|
'website_slides/static/src/js/systray_items/*.js',
|
||||||
|
],
|
||||||
|
'web.assets_tests': [
|
||||||
|
'website_slides/static/tests/tours/*.js',
|
||||||
|
],
|
||||||
|
'website_slides.slide_embed_assets': [
|
||||||
|
# TODO this bundle now includes 'assets_common' files directly, but
|
||||||
|
# most of these files are useless in this context, clean this up.
|
||||||
|
('include', 'web._assets_helpers'),
|
||||||
|
|
||||||
|
'web/static/src/scss/pre_variables.scss',
|
||||||
|
'web/static/lib/bootstrap/scss/_variables.scss',
|
||||||
|
|
||||||
|
'web/static/src/libs/fontawesome/css/font-awesome.css',
|
||||||
|
'web/static/lib/odoo_ui_icons/*',
|
||||||
|
'web/static/lib/select2/select2.css',
|
||||||
|
'web/static/lib/select2-bootstrap-css/select2-bootstrap.css',
|
||||||
|
'web/static/src/webclient/navbar/navbar.scss',
|
||||||
|
'web/static/src/scss/animation.scss',
|
||||||
|
'web/static/src/scss/fontawesome_overridden.scss',
|
||||||
|
'web/static/src/scss/mimetypes.scss',
|
||||||
|
'web/static/src/scss/ui.scss',
|
||||||
|
'web/static/src/core/colorpicker/colorpicker.scss',
|
||||||
|
'web/static/src/views/fields/translation_dialog.scss',
|
||||||
|
'web/static/src/views/fields/signature/signature_field.scss',
|
||||||
|
'web/static/src/legacy/scss/ui.scss',
|
||||||
|
'web/static/src/legacy/scss/modal.scss',
|
||||||
|
'website/static/src/libs/zoomodoo/zoomodoo.scss',
|
||||||
|
|
||||||
|
'web/static/src/module_loader.js',
|
||||||
|
'web/static/src/session.js',
|
||||||
|
|
||||||
|
'web/static/lib/luxon/luxon.js',
|
||||||
|
'web/static/lib/owl/owl.js',
|
||||||
|
'web/static/lib/owl/odoo_module.js',
|
||||||
|
'web/static/lib/jquery/jquery.js',
|
||||||
|
'web/static/lib/popper/popper.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/dom/data.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/dom/event-handler.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/dom/manipulator.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/dom/selector-engine.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/base-component.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/alert.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/button.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/carousel.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/collapse.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/dropdown.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/modal.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/offcanvas.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/tooltip.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/popover.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/scrollspy.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/tab.js',
|
||||||
|
'web/static/lib/bootstrap/js/dist/toast.js',
|
||||||
|
'web/static/lib/select2/select2.js',
|
||||||
|
'web/static/src/legacy/js/libs/bootstrap.js',
|
||||||
|
'web/static/src/legacy/js/libs/jquery.js',
|
||||||
|
'website/static/src/libs/zoomodoo/zoomodoo.js',
|
||||||
|
'web/static/src/core/**/*.js',
|
||||||
|
'web/static/src/env.js',
|
||||||
|
'web/static/src/libs/pdfjs.js',
|
||||||
|
('remove', 'web/static/src/core/emoji_picker/emoji_data.js'),
|
||||||
|
|
||||||
|
('include', 'web._assets_helpers'),
|
||||||
|
'web/static/src/scss/pre_variables.scss',
|
||||||
|
'web/static/lib/bootstrap/scss/_variables.scss',
|
||||||
|
('include', 'web._assets_bootstrap_frontend'),
|
||||||
|
'website_slides/static/src/scss/website_slides.scss',
|
||||||
|
('include', 'web.pdf_js_lib'),
|
||||||
|
'website_slides/static/lib/pdfslidesviewer/PDFSlidesViewer.js',
|
||||||
|
'website_slides/static/src/js/slides_embed.js',
|
||||||
|
],
|
||||||
|
'web.tests_assets': [
|
||||||
|
'website_slides/static/tests/helpers/*.js',
|
||||||
|
],
|
||||||
|
'web.qunit_suite_tests': [
|
||||||
|
'website_slides/static/tests/**/*',
|
||||||
|
('remove', 'website_slides/static/tests/tours/**/*'),
|
||||||
|
('remove', 'website_slides/static/tests/helpers/*.js'),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
'license': 'LGPL-3',
|
||||||
|
}
|
5
controllers/__init__.py
Normal file
5
controllers/__init__.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from . import main
|
||||||
|
from . import mail
|
94
controllers/mail.py
Normal file
94
controllers/mail.py
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
import werkzeug
|
||||||
|
|
||||||
|
from werkzeug.exceptions import NotFound, Forbidden
|
||||||
|
|
||||||
|
from odoo import http, _
|
||||||
|
from odoo.http import request
|
||||||
|
from odoo.addons.portal.controllers.mail import _check_special_access, PortalChatter
|
||||||
|
from odoo.tools import plaintext2html, html2plaintext
|
||||||
|
|
||||||
|
|
||||||
|
class SlidesPortalChatter(PortalChatter):
|
||||||
|
|
||||||
|
def _portal_post_has_content(self, res_model, res_id, message, attachment_ids=None, **kw):
|
||||||
|
""" Relax constraint on slide model: having a rating value is sufficient
|
||||||
|
to consider we have a content. """
|
||||||
|
if res_model == 'slide.channel' and kw.get('rating_value'):
|
||||||
|
return True
|
||||||
|
return super()._portal_post_has_content(res_model, res_id, message, attachment_ids=attachment_ids, **kw)
|
||||||
|
|
||||||
|
@http.route()
|
||||||
|
def portal_chatter_post(self, res_model, res_id, message, **kw):
|
||||||
|
result = super(SlidesPortalChatter, self).portal_chatter_post(res_model, res_id, message, **kw)
|
||||||
|
if result and res_model == 'slide.channel':
|
||||||
|
rating_value = kw.get('rating_value', False)
|
||||||
|
slide_channel = request.env[res_model].sudo().browse(int(res_id))
|
||||||
|
if rating_value and slide_channel and request.env.user.partner_id.id == int(kw.get('pid')):
|
||||||
|
# apply karma gain rule only once
|
||||||
|
request.env.user._add_karma(slide_channel.karma_gen_channel_rank, slide_channel, _('Course Ranked'))
|
||||||
|
result.update({
|
||||||
|
'default_rating_value': rating_value,
|
||||||
|
'rating_avg': slide_channel.rating_avg,
|
||||||
|
'rating_count': slide_channel.rating_count,
|
||||||
|
'force_submit_url': result.get('default_message_id') and '/slides/mail/update_comment',
|
||||||
|
})
|
||||||
|
return result
|
||||||
|
|
||||||
|
@http.route([
|
||||||
|
'/slides/mail/update_comment',
|
||||||
|
'/mail/chatter_update',
|
||||||
|
], type='json', auth="user", methods=['POST'])
|
||||||
|
def mail_update_message(self, res_model, res_id, message, message_id, attachment_ids=None, attachment_tokens=None, **post):
|
||||||
|
# keep this mechanism intern to slide currently (saas 12.5) as it is
|
||||||
|
# considered experimental
|
||||||
|
if res_model != 'slide.channel':
|
||||||
|
raise Forbidden()
|
||||||
|
res_id = int(res_id)
|
||||||
|
|
||||||
|
self._portal_post_check_attachments(attachment_ids, attachment_tokens)
|
||||||
|
|
||||||
|
pid = int(post['pid']) if post.get('pid') else False
|
||||||
|
if not _check_special_access(res_model, res_id, token=post.get('token'), _hash=post.get('hash'), pid=pid):
|
||||||
|
raise Forbidden()
|
||||||
|
|
||||||
|
# fetch and update mail.message
|
||||||
|
message_id = int(message_id)
|
||||||
|
message_body = plaintext2html(message)
|
||||||
|
subtype_comment_id = request.env['ir.model.data']._xmlid_to_res_id('mail.mt_comment')
|
||||||
|
domain = [
|
||||||
|
('model', '=', res_model),
|
||||||
|
('res_id', '=', res_id),
|
||||||
|
('subtype_id', '=', subtype_comment_id),
|
||||||
|
('author_id', '=', request.env.user.partner_id.id),
|
||||||
|
('message_type', '=', 'comment'),
|
||||||
|
('id', '=', message_id)
|
||||||
|
] # restrict to the given message_id
|
||||||
|
message = request.env['mail.message'].search(domain, limit=1)
|
||||||
|
if not message:
|
||||||
|
raise NotFound()
|
||||||
|
message.sudo().write({
|
||||||
|
'body': message_body,
|
||||||
|
'attachment_ids': [(4, aid) for aid in attachment_ids],
|
||||||
|
})
|
||||||
|
|
||||||
|
# update rating
|
||||||
|
if post.get('rating_value'):
|
||||||
|
domain = [('res_model', '=', res_model), ('res_id', '=', res_id), ('message_id', '=', message.id)]
|
||||||
|
rating = request.env['rating.rating'].sudo().search(domain, order='write_date DESC', limit=1)
|
||||||
|
rating.write({
|
||||||
|
'rating': float(post['rating_value']),
|
||||||
|
'feedback': html2plaintext(message.body),
|
||||||
|
})
|
||||||
|
channel = request.env[res_model].browse(res_id)
|
||||||
|
return {
|
||||||
|
'default_message_id': message.id,
|
||||||
|
'default_message': html2plaintext(message.body),
|
||||||
|
'default_rating_value': message.rating_value,
|
||||||
|
'rating_avg': channel.rating_avg,
|
||||||
|
'rating_count': channel.rating_count,
|
||||||
|
'default_attachment_ids': message.attachment_ids.sudo().read(['id', 'name', 'mimetype', 'file_size', 'access_token']),
|
||||||
|
'force_submit_url': '/slides/mail/update_comment',
|
||||||
|
}
|
1599
controllers/main.py
Normal file
1599
controllers/main.py
Normal file
File diff suppressed because it is too large
Load Diff
207
data/gamification_data.xml
Normal file
207
data/gamification_data.xml
Normal file
@ -0,0 +1,207 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<!-- Get started: register to the platform -->
|
||||||
|
<record id="badge_data_register" model="gamification.badge">
|
||||||
|
<field name="name">Get started</field>
|
||||||
|
<field name="description">Register to the platform</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/standard_badge_bronze.svg"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="level">bronze</field>
|
||||||
|
<field name="rule_auth">nobody</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_register_goal" model="gamification.goal.definition">
|
||||||
|
<field name="name">Get started</field>
|
||||||
|
<field name="description">Register to the platform</field>
|
||||||
|
<field name="computation_mode">count</field>
|
||||||
|
<field name="display_mode">boolean</field>
|
||||||
|
<field name="model_id" ref="base.model_res_users"/>
|
||||||
|
<field name="condition">higher</field>
|
||||||
|
<field name="domain">[
|
||||||
|
('active', '!=', False),
|
||||||
|
('karma', '>', 0),
|
||||||
|
]</field>
|
||||||
|
<field name="batch_mode">True</field>
|
||||||
|
<field name="batch_distinctive_field" ref="base.field_res_users__id"/>
|
||||||
|
<field name="batch_user_expression">user.id</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_register_challenge" model="gamification.challenge">
|
||||||
|
<field name="name">Register to the platform</field>
|
||||||
|
<field name="challenge_category">slides</field>
|
||||||
|
<field name="period">once</field>
|
||||||
|
<field name="visibility_mode">personal</field>
|
||||||
|
<field name="report_message_frequency">never</field>
|
||||||
|
<field name="reward_id" ref="badge_data_register"/>
|
||||||
|
<field name="reward_realtime">True</field>
|
||||||
|
<field name="user_domain">[('karma', '>', 0)]</field>
|
||||||
|
<field name="state">inprogress</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_register_challenge_line_0" model="gamification.challenge.line">
|
||||||
|
<field name="definition_id" ref="badge_data_register_goal"/>
|
||||||
|
<field name="challenge_id" ref="badge_data_register_challenge"/>
|
||||||
|
<field name="target_goal">1</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Know yourself: complete your profile -->
|
||||||
|
<record id="badge_data_profile" model="gamification.badge">
|
||||||
|
<field name="name">Know yourself</field>
|
||||||
|
<field name="description">Complete your profile</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/standard_badge_bronze.svg"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="level">bronze</field>
|
||||||
|
<field name="rule_auth">nobody</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_profile_goal" model="gamification.goal.definition">
|
||||||
|
<field name="name">Know yourself</field>
|
||||||
|
<field name="description">Complete your profile</field>
|
||||||
|
<field name="computation_mode">count</field>
|
||||||
|
<field name="display_mode">boolean</field>
|
||||||
|
<field name="model_id" ref="base.model_res_users"/>
|
||||||
|
<field name="condition">higher</field>
|
||||||
|
<field name="domain">[
|
||||||
|
('partner_id.country_id', '!=', False),
|
||||||
|
('partner_id.city', '!=', False),
|
||||||
|
('partner_id.email', '!=', False)
|
||||||
|
]</field>
|
||||||
|
<field name="batch_mode">True</field>
|
||||||
|
<field name="batch_distinctive_field" ref="base.field_res_users__id"/>
|
||||||
|
<field name="batch_user_expression">user.id</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_profile_challenge" model="gamification.challenge">
|
||||||
|
<field name="name">Complete your profile</field>
|
||||||
|
<field name="challenge_category">slides</field>
|
||||||
|
<field name="period">once</field>
|
||||||
|
<field name="visibility_mode">personal</field>
|
||||||
|
<field name="report_message_frequency">never</field>
|
||||||
|
<field name="reward_id" ref="badge_data_profile"/>
|
||||||
|
<field name="reward_realtime">True</field>
|
||||||
|
<field name="user_domain">[('karma', '>', 0)]</field>
|
||||||
|
<field name="state">inprogress</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_profile_challenge_line_0" model="gamification.challenge.line">
|
||||||
|
<field name="definition_id" ref="badge_data_profile_goal"/>
|
||||||
|
<field name="challenge_id" ref="badge_data_profile_challenge"/>
|
||||||
|
<field name="target_goal">1</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Power User: complete a course -->
|
||||||
|
<record id="badge_data_course" model="gamification.badge">
|
||||||
|
<field name="name">Power User</field>
|
||||||
|
<field name="description">Complete a course</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/standard_badge_silver.svg"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="level">silver</field>
|
||||||
|
<field name="rule_auth">nobody</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_course_goal" model="gamification.goal.definition">
|
||||||
|
<field name="name">Power User</field>
|
||||||
|
<field name="description">Complete a course</field>
|
||||||
|
<field name="computation_mode">count</field>
|
||||||
|
<field name="display_mode">boolean</field>
|
||||||
|
<field name="model_id" ref="website_slides.model_slide_channel_partner"/>
|
||||||
|
<field name="condition">higher</field>
|
||||||
|
<field name="domain">[
|
||||||
|
('member_status', '=', 'completed')
|
||||||
|
]</field>
|
||||||
|
<field name="batch_mode">True</field>
|
||||||
|
<field name="batch_distinctive_field" ref="website_slides.field_slide_channel_partner__partner_id"/>
|
||||||
|
<field name="batch_user_expression">user.partner_id.id</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_course_challenge" model="gamification.challenge">
|
||||||
|
<field name="name">Complete a course</field>
|
||||||
|
<field name="challenge_category">slides</field>
|
||||||
|
<field name="period">once</field>
|
||||||
|
<field name="visibility_mode">personal</field>
|
||||||
|
<field name="report_message_frequency">never</field>
|
||||||
|
<field name="reward_id" ref="badge_data_course"/>
|
||||||
|
<field name="reward_realtime">True</field>
|
||||||
|
<field name="user_domain">[('karma', '>', 0)]</field>
|
||||||
|
<field name="state">inprogress</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_course_challenge_line_0" model="gamification.challenge.line">
|
||||||
|
<field name="definition_id" ref="badge_data_course_goal"/>
|
||||||
|
<field name="challenge_id" ref="badge_data_course_challenge"/>
|
||||||
|
<field name="target_goal">1</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Certified Knowledge: get a certification -->
|
||||||
|
<record id="badge_data_certification" model="gamification.badge">
|
||||||
|
<field name="name">Certified Knowledge</field>
|
||||||
|
<field name="description">Get a certification</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/standard_badge_gold.svg"/>
|
||||||
|
<field name="is_published" eval="False"/>
|
||||||
|
<field name="level">gold</field>
|
||||||
|
<field name="rule_auth">nobody</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_certification_goal" model="gamification.goal.definition">
|
||||||
|
<field name="name">Certified Knowledge</field>
|
||||||
|
<field name="description">Get a certification</field>
|
||||||
|
<field name="computation_mode">count</field>
|
||||||
|
<field name="display_mode">boolean</field>
|
||||||
|
<field name="model_id" ref="website_slides.model_slide_slide_partner"/>
|
||||||
|
<field name="condition">higher</field>
|
||||||
|
<field name="domain">[
|
||||||
|
('completed', '=', True),
|
||||||
|
(0, '=', 1)
|
||||||
|
]</field>
|
||||||
|
<field name="batch_mode">True</field>
|
||||||
|
<field name="batch_distinctive_field" ref="website_slides.field_slide_slide_partner__partner_id"/>
|
||||||
|
<field name="batch_user_expression">user.partner_id.id</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_certification_challenge" model="gamification.challenge">
|
||||||
|
<field name="name">Get a certification</field>
|
||||||
|
<field name="challenge_category">slides</field>
|
||||||
|
<field name="period">once</field>
|
||||||
|
<field name="visibility_mode">personal</field>
|
||||||
|
<field name="report_message_frequency">never</field>
|
||||||
|
<field name="reward_id" ref="badge_data_certification"/>
|
||||||
|
<field name="reward_realtime">True</field>
|
||||||
|
<field name="user_domain">[('karma', '>', 0)]</field>
|
||||||
|
<field name="state">inprogress</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_certification_challenge_line_0" model="gamification.challenge.line">
|
||||||
|
<field name="definition_id" ref="badge_data_certification_goal"/>
|
||||||
|
<field name="challenge_id" ref="badge_data_certification_challenge"/>
|
||||||
|
<field name="target_goal">1</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Community hero: reach 2000 XP -->
|
||||||
|
<record id="badge_data_karma" model="gamification.badge">
|
||||||
|
<field name="name">Community hero</field>
|
||||||
|
<field name="description">Reach 2000 XP</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/standard_badge_gold.svg"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="level">gold</field>
|
||||||
|
<field name="rule_auth">nobody</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_karma_goal" model="gamification.goal.definition">
|
||||||
|
<field name="name">Community hero</field>
|
||||||
|
<field name="description">Reach 2000 XP</field>
|
||||||
|
<field name="computation_mode">count</field>
|
||||||
|
<field name="display_mode">boolean</field>
|
||||||
|
<field name="model_id" ref="base.model_res_users"/>
|
||||||
|
<field name="condition">higher</field>
|
||||||
|
<field name="domain">[
|
||||||
|
('karma', '>=', 2000)
|
||||||
|
]</field>
|
||||||
|
<field name="batch_mode">True</field>
|
||||||
|
<field name="batch_distinctive_field" ref="base.field_res_users__id"/>
|
||||||
|
<field name="batch_user_expression">user.id</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_karma_challenge" model="gamification.challenge">
|
||||||
|
<field name="name">Reach 2000 XP</field>
|
||||||
|
<field name="challenge_category">slides</field>
|
||||||
|
<field name="period">once</field>
|
||||||
|
<field name="visibility_mode">personal</field>
|
||||||
|
<field name="report_message_frequency">never</field>
|
||||||
|
<field name="reward_id" ref="badge_data_karma"/>
|
||||||
|
<field name="reward_realtime">True</field>
|
||||||
|
<field name="user_domain">[('karma', '>', 0)]</field>
|
||||||
|
<field name="state">inprogress</field>
|
||||||
|
</record>
|
||||||
|
<record id="badge_data_karma_challenge_line_0" model="gamification.challenge.line">
|
||||||
|
<field name="definition_id" ref="badge_data_karma_goal"/>
|
||||||
|
<field name="challenge_id" ref="badge_data_karma_challenge"/>
|
||||||
|
<field name="target_goal">1</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
9
data/mail_activity_type_data.xml
Normal file
9
data/mail_activity_type_data.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo><data noupdate="1">
|
||||||
|
<record id="mail_activity_data_access_request" model="mail.activity.type">
|
||||||
|
<field name="name">Access Request</field>
|
||||||
|
<field name="icon">fa-check-circle</field>
|
||||||
|
<field name="sequence">50</field>
|
||||||
|
<field name="res_model">slide.channel</field>
|
||||||
|
</record>
|
||||||
|
</data></odoo>
|
10
data/mail_message_subtype_data.xml
Normal file
10
data/mail_message_subtype_data.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo><data noupdate="1">
|
||||||
|
<!-- Channel subtypes -->
|
||||||
|
<record id="mt_channel_slide_published" model="mail.message.subtype">
|
||||||
|
<field name="name">Presentation Published</field>
|
||||||
|
<field name="res_model">slide.channel</field>
|
||||||
|
<field name="default" eval="True"/>
|
||||||
|
<field name="description">Presentation Published</field>
|
||||||
|
</record>
|
||||||
|
</data></odoo>
|
174
data/mail_template_data.xml
Normal file
174
data/mail_template_data.xml
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data noupdate="1">
|
||||||
|
<record id="slide_template_published" model="mail.template">
|
||||||
|
<field name="name">Elearning: New Course Content Notification</field>
|
||||||
|
<field name="model_id" ref="model_slide_slide"/>
|
||||||
|
<field name="subject">New {{ object.slide_category }} published on {{ object.channel_id.name }}</field>
|
||||||
|
<field name="description">Sent to attendees when new course is published</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px;">
|
||||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
Hello<br/><br/>
|
||||||
|
There is something new in the course <strong t-out="object.channel_id.name or ''">Trees, Wood and Gardens</strong> you are following:<br/><br/>
|
||||||
|
<center><strong t-out="object.name or ''">Trees</strong></center>
|
||||||
|
<t t-if="object.image_1024">
|
||||||
|
<div style="padding: 16px 8px 16px 8px; text-align: center;">
|
||||||
|
<a t-att-href="object.website_share_url">
|
||||||
|
<img t-att-alt="object.name" t-attf-src="{{ ctx.get('base_url') }}/web/image/slide.slide/{{ object.id }}/image_1024" style="height:auto; width:150px; margin: 16px;"/>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
<div style="padding: 16px 8px 16px 8px; text-align: center;">
|
||||||
|
<a t-att-href="object.website_share_url"
|
||||||
|
style="background-color: #875a7b; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;">View content</a>
|
||||||
|
</div>
|
||||||
|
Enjoy this exclusive content!
|
||||||
|
<t t-if="user.signature">
|
||||||
|
<br />
|
||||||
|
<t t-out="user.signature or ''">--<br/>Mitchell Admin</t>
|
||||||
|
</t>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</field>
|
||||||
|
<field name="auto_delete" eval="True"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="slide_template_shared" model="mail.template">
|
||||||
|
<field name="name">Elearning: Course Share</field>
|
||||||
|
<field name="model_id" ref="model_slide_slide"/>
|
||||||
|
<field name="subject">{{ user.name }} shared a {{ object.slide_category }} with you!</field>
|
||||||
|
<field name="email_from">{{ user.email_formatted }}</field>
|
||||||
|
<field name="email_to">{{ ctx.get('email', '') }}</field>
|
||||||
|
<field name="description">Sent when attendees share the course by email</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px;">
|
||||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
Hello<br/><br/>
|
||||||
|
<t t-out="user.name or ''">Mitchell Admin</t> shared the <t t-out="object.slide_category or ''">document</t> <strong t-out="object.name or ''">Trees</strong> with you!
|
||||||
|
<div style="margin: 16px 8px 16px 8px; text-align: center;">
|
||||||
|
<a t-att-href="(object.website_share_url + '?fullscreen=1') if ctx.get('fullscreen') else object.website_share_url">
|
||||||
|
<img t-att-alt="object.name" t-attf-src="{{ ctx.get('base_url') }}/web/image/slide.slide/{{ object.id }}/image_1024" style="height:auto; width:150px; margin: 16px;"/>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div style="padding: 16px 8px 16px 8px; text-align: center;">
|
||||||
|
<a t-att-href="(object.website_share_url + '?fullscreen=1') if ctx.get('fullscreen') else object.website_share_url"
|
||||||
|
style="background-color: #875a7b; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;">View <strong t-out="object.name or ''">Trees</strong></a>
|
||||||
|
</div>
|
||||||
|
<t t-if="user.signature">
|
||||||
|
<br />
|
||||||
|
<t t-out="user.signature or ''">--<br/>Mitchell Admin</t>
|
||||||
|
</t>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</field>
|
||||||
|
<field name="auto_delete" eval="True"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Completed Channel Message -->
|
||||||
|
<record id="mail_template_channel_completed" model="mail.template">
|
||||||
|
<field name="name">Elearning: Completed Course</field>
|
||||||
|
<field name="model_id" ref="model_slide_channel_partner"/>
|
||||||
|
<field name="subject">Congratulations! You completed {{ object.channel_id.name }}</field>
|
||||||
|
<field name="email_from">{{ (object.channel_id.user_id.email_formatted or object.channel_id.user_id.company_id.catchall_formatted) }}</field>
|
||||||
|
<field name="partner_to">{{ object.partner_id.id }}</field>
|
||||||
|
<field name="description">Sent to attendees once they've completed the course</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px;">
|
||||||
|
<div style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
<p style="margin: 0px;">Hello <t t-out="object.partner_id.name or ''">Brandon Freeman</t>,</p><br/>
|
||||||
|
<p><b>Congratulations!</b></p>
|
||||||
|
<p>You've completed the course <b t-out="object.channel_id.name or ''">Basics of Gardening</b></p>
|
||||||
|
<p>Check out the other available courses.</p><br/>
|
||||||
|
|
||||||
|
<div style="padding: 16px 8px 16px 8px; text-align: center;">
|
||||||
|
<a href="/slides/all" style="background-color: #875a7b; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;">
|
||||||
|
Explore courses
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
Enjoy this exclusive content!
|
||||||
|
<t t-if="object.channel_id.user_id.signature">
|
||||||
|
<br />
|
||||||
|
<t t-out="object.channel_id.user_id.signature or ''">--<br/>Mitchell Admin</t>
|
||||||
|
</t>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</field>
|
||||||
|
<field name="auto_delete" eval="True"/>
|
||||||
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="mail_template_channel_shared" model="mail.template">
|
||||||
|
<field name="name">Channel Shared</field>
|
||||||
|
<field name="model_id" ref="model_slide_channel"/>
|
||||||
|
<field name="subject">{{ user.name }} shared a Course</field>
|
||||||
|
<field name="email_from">{{ user.email_formatted }}</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px;">
|
||||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
Hello<br/><br/>
|
||||||
|
<t t-out="user.name or ''">Mitchell Admin</t> shared the <strong t-out="object.name or ''">document</strong> with you!
|
||||||
|
<div style="margin: 16px 8px 16px 8px; text-align: center;">
|
||||||
|
<a t-att-href="object.website_url">
|
||||||
|
<img t-att-alt="object.name"
|
||||||
|
t-attf-src="{{ ctx.get('base_url') }}/web/image/slide.channel/{{ object.id }}/image_256"
|
||||||
|
style="height:auto; width:150px; margin: 16px;"/>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div style="padding: 16px 8px 16px 8px; text-align: center;">
|
||||||
|
<a t-att-href="object.website_url"
|
||||||
|
style="background-color: #875a7b; padding: 8px 16px 8px 16px;
|
||||||
|
text-decoration: none; color: #fff; border-radius: 5px;">
|
||||||
|
View <strong t-out="object.name or ''">Document</strong></a>
|
||||||
|
</div>
|
||||||
|
<t t-if="user.signature">
|
||||||
|
<br />
|
||||||
|
<t t-out="user.signature or ''">--<br/>Mitchell Admin</t>
|
||||||
|
</t>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</field>
|
||||||
|
<field name="auto_delete" eval="True"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Slide channel invite feature -->
|
||||||
|
<record id="mail_template_slide_channel_enroll" model="mail.template">
|
||||||
|
<field name="name">Elearning: Add Attendees to Course</field>
|
||||||
|
<field name="model_id" ref="model_slide_channel_partner" />
|
||||||
|
<field name="subject">You have been invited to join {{ object.channel_id.name }}</field>
|
||||||
|
<field name="email_from">{{ user.email_formatted }}</field>
|
||||||
|
<field name="use_default_to" eval="True"/>
|
||||||
|
<field name="description">Sent to attendees when they are added to a course</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
Hello<br/><br/>
|
||||||
|
You have been enrolled to a new course: <t t-out="object.channel_id.name or ''">Basics of Gardening</t>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</field>
|
||||||
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
||||||
|
<field name="auto_delete" eval="True"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Slide channel sharing feature -->
|
||||||
|
<record id="mail_template_slide_channel_invite" model="mail.template">
|
||||||
|
<field name="name">Elearning: Promotional Course Invitation</field>
|
||||||
|
<field name="model_id" ref="model_slide_channel_partner" />
|
||||||
|
<field name="subject">You have been invited to check out {{ object.channel_id.name }}</field>
|
||||||
|
<field name="email_from">{{ user.email_formatted }}</field>
|
||||||
|
<field name="use_default_to" eval="True"/>
|
||||||
|
<field name="description">Sent to potential attendees to check out the course.</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
Hello<br/><br/>
|
||||||
|
You have been invited to check out this course: <t t-out="object.channel_id.name or ''">Basics of Gardening</t>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</field>
|
||||||
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
||||||
|
<field name="auto_delete" eval="True"/>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
73
data/mail_templates.xml
Normal file
73
data/mail_templates.xml
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo><data noupdate="1">
|
||||||
|
<!-- QWeb templates -->
|
||||||
|
<!-- Note: mail_notification_channel_invite: record should be a slide.channel.partner record -->
|
||||||
|
<template id="mail_notification_channel_invite">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="padding-top: 16px; background-color: #F1F1F1; font-family:Verdana, Arial,sans-serif; color: #454748; width: 100%; border-collapse:separate;"><tr><td align="center">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="590" style="padding: 24px; background-color: white; color: #454748; border-collapse:separate;">
|
||||||
|
<tbody>
|
||||||
|
<!-- HEADER -->
|
||||||
|
<tr>
|
||||||
|
<td align="center" style="min-width: 590px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: white; padding: 0; border-collapse:separate;">
|
||||||
|
<tr><td valign="middle">
|
||||||
|
<span style="font-size: 10px;">Your <t t-esc="model_description or 'document'"/></span><br/>
|
||||||
|
<span style="font-size: 20px; font-weight: bold;">
|
||||||
|
<t t-esc="message.record_name and message.record_name.replace('/','-') or ''"/>
|
||||||
|
</span>
|
||||||
|
</td><td valign="middle" align="right" t-if="company and not company.uses_default_logo">
|
||||||
|
<img t-att-src="'/logo.png?company=%s' % company.id" style="padding: 0px; margin: 0px; height: 48px;" t-att-alt="'%s' % company.name"/>
|
||||||
|
</td></tr>
|
||||||
|
<tr><td colspan="2" style="text-align:center;">
|
||||||
|
<hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin:4px 0px 32px 0px;"/>
|
||||||
|
</td></tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- CONTENT -->
|
||||||
|
<tr>
|
||||||
|
<td style="min-width: 590px;">
|
||||||
|
<t t-out="message.body"/>
|
||||||
|
<div style="margin: 32px 0px 32px 0px; text-align: center;">
|
||||||
|
<a t-att-href="record.invitation_link"
|
||||||
|
style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">
|
||||||
|
<t t-if="enroll_mode"> Click here to start the course </t> <t t-else=""> Click here to get started </t>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div style="margin: 0px; padding: 0px; font-size:13px;">
|
||||||
|
Enjoy this exclusive content!
|
||||||
|
</div>
|
||||||
|
<div>&nbsp;</div>
|
||||||
|
<div t-if="signature" style="font-size: 13px;">
|
||||||
|
<div t-out="signature"/>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- FOOTER -->
|
||||||
|
<tr>
|
||||||
|
<td align="center" style="min-width: 590px; padding: 0 8px 0 8px; font-size:11px;">
|
||||||
|
<hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin: 16px 0px 4px 0px;"/>
|
||||||
|
<b t-esc="company.name"/><br/>
|
||||||
|
<div style="color: #999999;">
|
||||||
|
<t t-esc="company.phone"/>
|
||||||
|
<t t-if="company.email"> |
|
||||||
|
<a t-att-href="'mailto:%s' % company.email" style="text-decoration:none; color: #999999;"><t t-esc="company.email"/></a>
|
||||||
|
</t>
|
||||||
|
<t t-if="company.website"> |
|
||||||
|
<a t-att-href="'%s' % company.website" style="text-decoration:none; color: #999999;">
|
||||||
|
<t t-esc="company.website"/>
|
||||||
|
</a>
|
||||||
|
</t>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td></tr>
|
||||||
|
<!-- POWERED BY -->
|
||||||
|
<tr><td align="center" style="min-width: 590px;">
|
||||||
|
Powered by <a target="_blank" href="https://www.odoo.com?utm_source=db&utm_medium=email" style="color: #875A7B;">Odoo</a>
|
||||||
|
</td></tr>
|
||||||
|
</table>
|
||||||
|
</template>
|
||||||
|
</data></odoo>
|
12
data/res_users_demo.xml
Normal file
12
data/res_users_demo.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data noupdate="1">
|
||||||
|
<record id="website_slides.group_website_slides_officer" model="res.groups">
|
||||||
|
<field name="users" eval="[(4, ref('base.user_demo'))]"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="website_slides.group_website_slides_manager" model="res.groups">
|
||||||
|
<field name="users" eval="[(4, ref('base.user_admin')), (4, ref('base.user_root'))]"/>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
160
data/slide_channel_demo.xml
Normal file
160
data/slide_channel_demo.xml
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo><data noupdate="1">
|
||||||
|
|
||||||
|
<!-- This channel will gain a forum -->
|
||||||
|
<record id="slide_channel_demo_0_gard_0" model="slide.channel">
|
||||||
|
<field name="name">Basics of Gardening</field>
|
||||||
|
<field name="user_id" ref="base.user_admin"/>
|
||||||
|
<field name="enroll">public</field>
|
||||||
|
<field name="channel_type">training</field>
|
||||||
|
<field name="allow_comment" eval="True"/>
|
||||||
|
<field name="promote_strategy">most_voted</field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<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="user_id" ref="base.user_admin"/>
|
||||||
|
<field name="enroll">public</field>
|
||||||
|
<field name="channel_type">training</field>
|
||||||
|
<field name="allow_comment" eval="True"/>
|
||||||
|
<field name="promote_strategy">latest</field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="tag_ids" eval="[(5, 0),
|
||||||
|
(4, ref('website_slides.slide_channel_tag_level_intermediate')),
|
||||||
|
(4, ref('website_slides.slide_channel_tag_role_gardener')),
|
||||||
|
(4, ref('website_slides.slide_channel_tag_other_0'))]"/>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_gardening_2.jpg"/>
|
||||||
|
<field name="description">Learn how to take care of your favorite trees. Learn when to plant, how to manage potted trees, ...</field>
|
||||||
|
<field name="create_date" eval="DateTime.now() - relativedelta(days=7)"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- This channel will gain a forum -->
|
||||||
|
<record id="slide_channel_demo_2_gard2" model="slide.channel">
|
||||||
|
<field name="name">Trees, Wood and Gardens</field>
|
||||||
|
<field name="user_id" ref="base.user_demo"/>
|
||||||
|
<field name="prerequisite_channel_ids" eval="[(5, 0),
|
||||||
|
(4, ref('website_slides.slide_channel_demo_0_gard_0')),
|
||||||
|
(4, ref('website_slides.slide_channel_demo_1_gard1'))]"/>
|
||||||
|
<field name="enroll">public</field>
|
||||||
|
<field name="channel_type">documentation</field>
|
||||||
|
<field name="allow_comment" eval="True"/>
|
||||||
|
<field name="promote_strategy">most_viewed</field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="tag_ids" eval="[(5, 0),
|
||||||
|
(4, ref('website_slides.slide_channel_tag_level_intermediate')),
|
||||||
|
(4, ref('website_slides.slide_channel_tag_role_gardener')),
|
||||||
|
(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_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>
|
||||||
|
|
||||||
|
<record id="slide_channel_demo_3_furn0" model="slide.channel">
|
||||||
|
<field name="name">Choose your wood!</field>
|
||||||
|
<field name="user_id" ref="base.user_admin"/>
|
||||||
|
<field name="enroll">invite</field>
|
||||||
|
<field name="visibility">members</field>
|
||||||
|
<field name="channel_type">training</field>
|
||||||
|
<field name="allow_comment" eval="True"/>
|
||||||
|
<field name="promote_strategy">latest</field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<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_role_carpenter')),
|
||||||
|
(4, ref('website_slides.slide_channel_tag_role_furniture')),
|
||||||
|
(4, ref('website_slides.slide_channel_tag_other_2'))]"/>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/channel_demo_tree_1.jpg"/>
|
||||||
|
<field name="description">Knowing which kind of wood to use depending on your application is important. In this course you
|
||||||
|
will learn the basics of wood characteristics.</field>
|
||||||
|
<field name="create_date" eval="DateTime.now() - relativedelta(days=5)"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="slide_channel_demo_4_furn1" model="slide.channel">
|
||||||
|
<field name="name">Furniture Technical Specifications</field>
|
||||||
|
<field name="user_id" ref="base.user_admin"/>
|
||||||
|
<field name="enroll">invite</field>
|
||||||
|
<field name="channel_type">documentation</field>
|
||||||
|
<field name="allow_comment" eval="True"/>
|
||||||
|
<field name="promote_strategy">most_voted</field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="tag_ids" eval="[(5, 0),
|
||||||
|
(4, ref('website_slides.slide_channel_tag_level_intermediate')),
|
||||||
|
(4, ref('website_slides.slide_channel_tag_role_furniture'))]"/>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- This channel will gain a certification slide -->
|
||||||
|
<record id="slide_channel_demo_5_furn2" model="slide.channel">
|
||||||
|
<field name="name">Basics of Furniture Creation</field>
|
||||||
|
<field name="user_id" ref="base.user_admin"/>
|
||||||
|
<field name="enroll">invite</field>
|
||||||
|
<field name="visibility">connected</field>
|
||||||
|
<field name="channel_type">training</field>
|
||||||
|
<field name="allow_comment" eval="True"/>
|
||||||
|
<field name="promote_strategy">latest</field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="tag_ids" eval="[(5, 0),
|
||||||
|
(4, ref('website_slides.slide_channel_tag_level_intermediate')),
|
||||||
|
(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_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>
|
||||||
|
|
||||||
|
<!-- This channel will be set on payment -->
|
||||||
|
<!-- This channel will gain a certification slide -->
|
||||||
|
<record id="slide_channel_demo_6_furn3" model="slide.channel">
|
||||||
|
<field name="name">DIY Furniture</field>
|
||||||
|
<field name="user_id" ref="base.user_demo"/>
|
||||||
|
<field name="enroll">invite</field>
|
||||||
|
<field name="channel_type">training</field>
|
||||||
|
<field name="allow_comment" eval="True"/>
|
||||||
|
<field name="promote_strategy">most_voted</field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="tag_ids" eval="[(5, 0),
|
||||||
|
(4, ref('website_slides.slide_channel_tag_level_advanced')),
|
||||||
|
(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_furniture_3.jpg"/>
|
||||||
|
<field name="description">So much amazing certification.</field>
|
||||||
|
<field name="create_date" eval="DateTime.now() - relativedelta(days=2)"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="slide_tag_demo_cheatsheet" model="slide.tag">
|
||||||
|
<field name="name">CheatSheet</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_tag_demo_theory" model="slide.tag">
|
||||||
|
<field name="name">Theory</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_tag_demo_exercises" model="slide.tag">
|
||||||
|
<field name="name">Exercises</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_tag_demo_tools" model="slide.tag">
|
||||||
|
<field name="name">Tools</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_tag_demo_colorful" model="slide.tag">
|
||||||
|
<field name="name">Colorful</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_tag_demo_howto" model="slide.tag">
|
||||||
|
<field name="name">HowTo</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data></odoo>
|
36
data/slide_channel_tag_demo.xml
Normal file
36
data/slide_channel_tag_demo.xml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo><data noupdate="1">
|
||||||
|
<record id="slide_channel_tag_group_role" model="slide.channel.tag.group">
|
||||||
|
<field name="name">Your Role</field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_tag_role_gardener" model="slide.channel.tag">
|
||||||
|
<field name="name">Gardener</field>
|
||||||
|
<field name="color">10</field>
|
||||||
|
<field name="group_id" ref="website_slides.slide_channel_tag_group_role"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_tag_role_carpenter" model="slide.channel.tag">
|
||||||
|
<field name="name">Carpenter</field>
|
||||||
|
<field name="color">11</field>
|
||||||
|
<field name="group_id" ref="website_slides.slide_channel_tag_group_role"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_tag_role_furniture" model="slide.channel.tag">
|
||||||
|
<field name="name">Furniture Designer</field>
|
||||||
|
<field name="color">3</field>
|
||||||
|
<field name="group_id" ref="website_slides.slide_channel_tag_group_role"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="slide_channel_tag_other_0" model="slide.channel.tag">
|
||||||
|
<field name="name">Quiz</field>
|
||||||
|
<field name="group_id" ref="website_slides.slide_channel_tag_group_data_other"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_tag_other_1" model="slide.channel.tag">
|
||||||
|
<field name="name">Certification</field>
|
||||||
|
<field name="color">7</field>
|
||||||
|
<field name="group_id" ref="website_slides.slide_channel_tag_group_data_other"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_tag_other_2" model="slide.channel.tag">
|
||||||
|
<field name="name">Dog Friendly</field>
|
||||||
|
<field name="group_id" ref="website_slides.slide_channel_tag_group_data_other"/>
|
||||||
|
</record>
|
||||||
|
</data></odoo>
|
29
data/slide_data.xml
Normal file
29
data/slide_data.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data noupdate="1">
|
||||||
|
<record id="slide_channel_tag_group_data_other" model="slide.channel.tag.group">
|
||||||
|
<field name="name">Tags</field>
|
||||||
|
<field name="sequence">20</field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_tag_group_level" model="slide.channel.tag.group">
|
||||||
|
<field name="name">Your Level</field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_tag_level_basic" model="slide.channel.tag">
|
||||||
|
<field name="name">Basic</field>
|
||||||
|
<field name="color">10</field>
|
||||||
|
<field name="group_id" ref="website_slides.slide_channel_tag_group_level"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_tag_level_intermediate" model="slide.channel.tag">
|
||||||
|
<field name="name">Intermediate</field>
|
||||||
|
<field name="color">3</field>
|
||||||
|
<field name="group_id" ref="website_slides.slide_channel_tag_group_level"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_tag_level_advanced" model="slide.channel.tag">
|
||||||
|
<field name="name">Advanced</field>
|
||||||
|
<field name="color">1</field>
|
||||||
|
<field name="group_id" ref="website_slides.slide_channel_tag_group_level"/>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
825
data/slide_slide_demo.xml
Normal file
825
data/slide_slide_demo.xml
Normal file
@ -0,0 +1,825 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo><data noupdate="1">
|
||||||
|
|
||||||
|
<!-- CHANNEL 0: Basics of Gardening -->
|
||||||
|
<!-- ================================================== -->
|
||||||
|
<record id="slide_slide_demo_0_0" model="slide.slide">
|
||||||
|
<field name="name">Gardening: The Know-How</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
<field name="binary_content" 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"/>
|
||||||
|
<field name="slide_category">document</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="True"/>
|
||||||
|
<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. All the basics for this course about gardening.</field>
|
||||||
|
</record>
|
||||||
|
<!--RESOURCE-->
|
||||||
|
<record id="slide_slide_demo_0_0_resource_0" model="slide.slide.resource">
|
||||||
|
<field name="resource_type">file</field>
|
||||||
|
<field name="name">Document</field>
|
||||||
|
<field name="data" type="base64" file="website_slides/static/src/img/document.png"/>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_0_0"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_0_1" model="slide.slide">
|
||||||
|
<field name="name">Home Gardening</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_gardening_1.jpg"/>
|
||||||
|
<field name="slide_category">infographic</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="False"/>
|
||||||
|
<field name="public_views">5</field>
|
||||||
|
<field name="completion_time">1</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">Interesting information 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_category">infographic</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<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 | Basics</field>
|
||||||
|
<field name="sequence">4</field>
|
||||||
|
<field name="binary_content" type="base64" file="website_slides/static/src/img/presentation.pdf"/>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_thumb_l0JZ25VvbwE.jpg"/>
|
||||||
|
<field name="slide_category">document</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<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_category">quiz</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="True"/>
|
||||||
|
<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="sequence">1</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="sequence">1</field>
|
||||||
|
<field name="is_correct" eval="True"/>
|
||||||
|
<field name="comment">Correct! A strawberry is a fruit because it's the product of a tree.</field>
|
||||||
|
<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="sequence">2</field>
|
||||||
|
<field name="is_correct" eval="False"/>
|
||||||
|
<field name="comment">Incorrect! A strawberry is not a vegetable.</field>
|
||||||
|
<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="sequence">3</field>
|
||||||
|
<field name="is_correct" eval="False"/>
|
||||||
|
<field name="comment">Incorrect! A table is a piece of furniture.</field>
|
||||||
|
<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="sequence">2</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="sequence">1</field>
|
||||||
|
<field name="is_correct" eval="True"/>
|
||||||
|
<field name="comment">Correct! A shovel is the perfect tool to dig a hole.</field>
|
||||||
|
<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="sequence">2</field>
|
||||||
|
<field name="is_correct" eval="False"/>
|
||||||
|
<field name="comment">Incorrect! Good luck digging a hole with a spoon...</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_0_4_question_1"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- CHANNEL 1: Taking care of Trees -->
|
||||||
|
<!-- ================================================== -->
|
||||||
|
|
||||||
|
<!-- Categories -->
|
||||||
|
<record id="slide_category_demo_1_0" model="slide.slide">
|
||||||
|
<field name="name">Interesting Facts</field>
|
||||||
|
<field name="is_category" eval="True"/>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="sequence">0</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_category_demo_1_1" model="slide.slide">
|
||||||
|
<field name="name">Methods</field>
|
||||||
|
<field name="is_category" eval="True"/>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="sequence">4</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Slides -->
|
||||||
|
<record id="slide_slide_demo_1_0" model="slide.slide">
|
||||||
|
<field name="name">Tree Infographic</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_tree_infographic_1.jpg"/>
|
||||||
|
<field name="slide_category">infographic</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="True"/>
|
||||||
|
<field name="public_views">5</field>
|
||||||
|
<field name="completion_time">0.5</field>
|
||||||
|
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorful'))]"/>
|
||||||
|
<field name="description">Just some basics Tree Infographic.</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_1" model="slide.slide">
|
||||||
|
<field name="name">Interesting Tree Facts</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_tree_infographic_2.jpg"/>
|
||||||
|
<field name="slide_category">infographic</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="False"/>
|
||||||
|
<field name="public_views">5</field>
|
||||||
|
<field name="completion_time">1.5</field>
|
||||||
|
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorful'))]"/>
|
||||||
|
<field name="description">Just some basics Interesting Tree Facts.</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_2" model="slide.slide">
|
||||||
|
<field name="name">Energy Efficiency Facts</field>
|
||||||
|
<field name="sequence">3</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_tree_infographic_3.jpg"/>
|
||||||
|
<field name="slide_category">infographic</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="False"/>
|
||||||
|
<field name="public_views">10</field>
|
||||||
|
<field name="completion_time">1</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">Just some basics Energy Efficiency Facts.</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_2_link_0" model="slide.slide.resource">
|
||||||
|
<field name="resource_type">url</field>
|
||||||
|
<field name="name">Energy Efficient Link 1</field>
|
||||||
|
<field name="link">http://www.example.com</field>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_1_2"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_2_link_1" model="slide.slide.resource">
|
||||||
|
<field name="resource_type">url</field>
|
||||||
|
<field name="name">Energy Efficient Link 2</field>
|
||||||
|
<field name="link">http://www.example.com</field>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_1_2"/>
|
||||||
|
</record>
|
||||||
|
<!--RESOURCE-->
|
||||||
|
<record id="slide_slide_demo_1_2_resource_0" model="slide.slide.resource">
|
||||||
|
<field name="resource_type">file</field>
|
||||||
|
<field name="name">Presentation</field>
|
||||||
|
<field name="data" type="base64" file="website_slides/static/src/img/presentation.pdf"/>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_1_2"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_3" model="slide.slide">
|
||||||
|
<field name="name">How to plant a potted tree</field>
|
||||||
|
<field name="sequence">5</field>
|
||||||
|
<field name="url">https://www.youtube.com/watch?v=QYmgrw0PgLU</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_thumb_QYmgrw0PgLU.jpg"/>
|
||||||
|
<field name="slide_category">video</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<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">Jim and Todd plant a potted tree for a customer of Knecht's Nurseries and Landscaping. Narrated by Leif Knecht, owner.</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_4" model="slide.slide">
|
||||||
|
<field name="name">A little chat with Harry Potted</field>
|
||||||
|
<field name="sequence">6</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_tree_img_1.jpg"/>
|
||||||
|
<field name="slide_category">article</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="html_content" type="html">
|
||||||
|
<section class="s_cover parallax bg-black-50 pt16 pb16" data-scroll-background-ratio="0" style="background-image: none;" data-snippet="s_cover">
|
||||||
|
<span class="s_parallax_bg oe_img_bg" style="background-image: url('/website_slides/static/src/img/slide_demo_tree_img_1.jpg'); background-position: 50% 0;"></span>
|
||||||
|
<div class="o_we_bg_filter bg-black-50"/>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row s_nb_column_fixed">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<h1 class="o_default_snippet_text display-3" style="text-align: center;">Catchy Headline</h1>
|
||||||
|
<p class="lead o_default_snippet_text" style="text-align: center;">Write one or two paragraphs describing your product, services or a specific feature.<br/> To be successful your content needs to be useful to your readers.</p>
|
||||||
|
<p>
|
||||||
|
<a href="/contactus" class="btn btn-primary rounded-circle o_default_snippet_text">Contact us</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="s_text_image pt32 pb32" data-snippet="s_text_image">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-lg-6 pt16 pb16">
|
||||||
|
<img src="/website_slides/static/src/img/slide_demo_tree_img_1.jpg" class="img img-fluid mx-auto" alt="Odoo • Image and Text"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 pt16 pb16">
|
||||||
|
<h2 class="o_default_snippet_text">Section Subtitle</h2>
|
||||||
|
<p class="o_default_snippet_text">Write one or two paragraphs describing your product or services. <br/>To be successful your content needs to be useful to your readers.</p>
|
||||||
|
<p class="o_default_snippet_text">Start with the customer – find out what they want and give it to them.</p>
|
||||||
|
<p class="o_default_snippet_text"><a href="#" class="btn btn-outline-primary">Discover more</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section></field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="True"/>
|
||||||
|
<field name="public_views">5</field>
|
||||||
|
<field name="completion_time">1</field>
|
||||||
|
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorful'))]"/>
|
||||||
|
<field name="description">We had a little chat with Harry Potted, sure he had interesting things to say!</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_4_link_0" model="slide.slide.resource">
|
||||||
|
<field name="resource_type">url</field>
|
||||||
|
<field name="name">Know More Link 1</field>
|
||||||
|
<field name="link">http://www.example.com</field>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_1_4"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_4_link_1" model="slide.slide.resource">
|
||||||
|
<field name="resource_type">url</field>
|
||||||
|
<field name="name">Know More Link 2</field>
|
||||||
|
<field name="link">http://www.example.com</field>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_1_4"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_4_question_0" model="slide.question">
|
||||||
|
<field name="question">Do you think Harry Potted has a good name?</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_1_4"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_4_question_0_0" model="slide.answer">
|
||||||
|
<field name="text_value">Yes</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
<field name="is_correct" eval="True"/>
|
||||||
|
<field name="comment">Correct!</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_1_4_question_0"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_4_question_0_1" model="slide.answer">
|
||||||
|
<field name="text_value">No</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="is_correct" eval="False"/>
|
||||||
|
<field name="comment">Incorrect!</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_1_4_question_0"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_4_question_1" model="slide.question">
|
||||||
|
<field name="question">Did you read the whole article?</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_1_4"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_4_question_1_0" model="slide.answer">
|
||||||
|
<field name="text_value">Yes</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
<field name="is_correct" eval="True"/>
|
||||||
|
<field name="comment">Correct! Congratulations you have time to loose</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_1_4_question_1"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_4_question_1_1" model="slide.answer">
|
||||||
|
<field name="text_value">No</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="is_correct" eval="False"/>
|
||||||
|
<field name="comment">Incorrect! You really should read it.</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_1_4_question_1"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_4_question_1_2" model="slide.answer">
|
||||||
|
<field name="text_value">What was the question again?</field>
|
||||||
|
<field name="sequence">3</field>
|
||||||
|
<field name="is_correct" eval="False"/>
|
||||||
|
<field name="comment">Incorrect! Seriously?</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_1_4_question_1"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_5" model="slide.slide">
|
||||||
|
<field name="name">3 Main Methodologies</field>
|
||||||
|
<field name="sequence">6</field>
|
||||||
|
<field name="binary_content" 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"/>
|
||||||
|
<field name="slide_category">document</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="False"/>
|
||||||
|
<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_howto'))]"/>
|
||||||
|
<field name="description">A summary of know-how: how and what.</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_1_6" model="slide.slide">
|
||||||
|
<field name="name">How to Grow and Harvest The Best Strawberries | Gardening Tips and Tricks</field>
|
||||||
|
<field name="sequence">7</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="slide_category">video</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- CHANNEL 2: Trees, Wood and Garden -->
|
||||||
|
<!-- ================================================== -->
|
||||||
|
|
||||||
|
<!-- Categories -->
|
||||||
|
<record id="slide_category_demo_2_0" model="slide.slide">
|
||||||
|
<field name="name">Trees</field>
|
||||||
|
<field name="is_category" eval="True"/>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/>
|
||||||
|
<field name="sequence">0</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_category_demo_2_1" model="slide.slide">
|
||||||
|
<field name="name">Wood</field>
|
||||||
|
<field name="is_category" eval="True"/>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/>
|
||||||
|
<field name="sequence">4</field>
|
||||||
|
</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>
|
||||||
|
<field name="binary_content" type="base64" file="website_slides/static/src/img/presentation.pdf"/>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_tree_img_2.jpg"/>
|
||||||
|
<field name="slide_category">document</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="True"/>
|
||||||
|
<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="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">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.resource">
|
||||||
|
<field name="resource_type">url</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.resource">
|
||||||
|
<field name="resource_type">url</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>
|
||||||
|
<!--RESOURCE-->
|
||||||
|
<record id="slide_slide_demo_2_0_resource_0" model="slide.slide.resource">
|
||||||
|
<field name="resource_type">file</field>
|
||||||
|
<field name="name">Tree image</field>
|
||||||
|
<field name="data" type="base64" file="website_slides/static/src/img/slide_demo_tree_img_2.jpg"/>
|
||||||
|
<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="sequence">1</field>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_2_0"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_2_0_question_0_0" model="slide.answer">
|
||||||
|
<field name="text_value">Yes</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
<field name="is_correct" eval="False"/>
|
||||||
|
<field name="comment">Incorrect!</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_2_0_question_0"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_2_0_question_0_1" model="slide.answer">
|
||||||
|
<field name="text_value">No</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="is_correct" eval="True"/>
|
||||||
|
<field name="comment">Correct!</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_2_0_question_0"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_2_0_question_1" model="slide.question">
|
||||||
|
<field name="question">Do you make lemons out of beams?</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_2_0"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_2_0_question_1_0" model="slide.answer">
|
||||||
|
<field name="text_value">Yes</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
<field name="is_correct" eval="False"/>
|
||||||
|
<field name="comment">Incorrect!</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_2_0_question_1"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_2_0_question_1_1" model="slide.answer">
|
||||||
|
<field name="text_value">No</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="is_correct" eval="True"/>
|
||||||
|
<field name="comment">Correct!</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_2_0_question_1"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_2_0_question_1_2" model="slide.answer">
|
||||||
|
<field name="text_value">And also bananas</field>
|
||||||
|
<field name="sequence">3</field>
|
||||||
|
<field name="is_correct" eval="False"/>
|
||||||
|
<field name="comment">Incorrect! of course not ...</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_2_0_question_1"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_2_1" model="slide.slide">
|
||||||
|
<field name="name">A Mighty Forest from Ages</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_tree_img_3.jpg"/>
|
||||||
|
<field name="slide_category">article</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/>
|
||||||
|
<field name="html_content" type="html">
|
||||||
|
<section class="s_cover parallax bg-black-50 pt16 pb16" data-scroll-background-ratio="0" style="background-image: none;" data-snippet="s_cover">
|
||||||
|
<span class="s_parallax_bg oe_img_bg" style="background-image: url('/website_slides/static/src/img/slide_demo_tree_img_3.jpg'); background-position: 50% 0;"></span>
|
||||||
|
<div class="o_we_bg_filter bg-black-50"/>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row s_nb_column_fixed">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<h1 class="o_default_snippet_text display-3" style="text-align: center;">Catchy Headline</h1>
|
||||||
|
<p class="lead o_default_snippet_text" style="text-align: center;">Write one or two paragraphs describing your product, services or a specific feature.<br/> To be successful your content needs to be useful to your readers.</p>
|
||||||
|
<p class="o_default_snippet_text">
|
||||||
|
<a href="/contactus" class="btn btn-primary rounded-circle">Contact us</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="s_text_image pt32 pb32" data-snippet="s_text_image">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-lg-6 pt16 pb16">
|
||||||
|
<img src="/website_slides/static/src/img/slide_demo_tree_img_3.jpg" class="img img-fluid mx-auto" alt="Odoo • Image and Text"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 pt16 pb16">
|
||||||
|
<h2 class="o_default_snippet_text">Section Subtitle</h2>
|
||||||
|
<p class="o_default_snippet_text">Write one or two paragraphs describing your product or services. <br/>To be successful your content needs to be useful to your readers.</p>
|
||||||
|
<p class="o_default_snippet_text">Start with the customer – find out what they want and give it to them.</p>
|
||||||
|
<p class="o_default_snippet_text">
|
||||||
|
<a href="#" class="btn btn-outline-primary">Discover more</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section></field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<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_theory'))]"/>
|
||||||
|
<field name="description">Mighty forest just don't appear in a few weeks. Learn how time made our forests mighty and mysterious.</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_2_2" model="slide.slide">
|
||||||
|
<field name="name">Tree planting in hanging bottles on wall</field>
|
||||||
|
<field name="sequence">3</field>
|
||||||
|
<field name="url">https://www.youtube.com/watch?v=ebBez6bcSEc</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_thumb_ebBez6bcSEc.jpg"/>
|
||||||
|
<field name="slide_category">video</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<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">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="binary_content" 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_category">document</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<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! -->
|
||||||
|
<!-- ======================================= -->
|
||||||
|
|
||||||
|
<!-- Categories -->
|
||||||
|
<record id="slide_category_demo_3_0" model="slide.slide">
|
||||||
|
<field name="name">Working with Wood</field>
|
||||||
|
<field name="is_category" eval="True"/>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_3_furn0"/>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Slides -->
|
||||||
|
<record id="slide_slide_demo_3_0" model="slide.slide">
|
||||||
|
<field name="name">Comparing Hardness of Wood Species</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_wood_infographic_1.jpg"/>
|
||||||
|
<field name="slide_category">infographic</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_3_furn0"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="True"/>
|
||||||
|
<field name="public_views">10</field>
|
||||||
|
<field name="completion_time">12</field>
|
||||||
|
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_colorful'))]"/>
|
||||||
|
<field name="description">Comparing Hardness of Wood Species</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_3_1" model="slide.slide">
|
||||||
|
<field name="name">Wood Bending With Steam Box</field>
|
||||||
|
<field name="sequence">3</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_thumb_PYr1rK8pS30.jpg"/>
|
||||||
|
<field name="url">https://www.youtube.com/watch?v=PYr1rK8pS30</field>
|
||||||
|
<field name="slide_category">video</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_3_furn0"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="False"/>
|
||||||
|
<field name="public_views">10</field>
|
||||||
|
<field name="completion_time">3</field>
|
||||||
|
<field name="description">Watching the master(s) at work</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- CHANNEL 4: Furniture Technical Specifications -->
|
||||||
|
<!-- ======================================= -->
|
||||||
|
|
||||||
|
<!-- Categories -->
|
||||||
|
<record id="slide_category_demo_4_0" model="slide.slide">
|
||||||
|
<field name="name">Documents</field>
|
||||||
|
<field name="is_category" eval="True"/>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_4_furn1"/>
|
||||||
|
<field name="sequence">0</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_category_demo_4_1" model="slide.slide">
|
||||||
|
<field name="name">Technical Drawings</field>
|
||||||
|
<field name="is_category" eval="True"/>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_4_furn1"/>
|
||||||
|
<field name="sequence">10</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Slides -->
|
||||||
|
<record id="slide_slide_demo_4_0" model="slide.slide">
|
||||||
|
<field name="name">Foreword</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_furniture_2.jpg"/>
|
||||||
|
<field name="slide_category">article</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_4_furn1"/>
|
||||||
|
<field name="html_content" type="html">
|
||||||
|
<section class="s_cover parallax bg-black-50 pt16 pb16" data-scroll-background-ratio="0" style="background-image: none;" data-snippet="s_cover">
|
||||||
|
<span class="s_parallax_bg oe_img_bg" style="background-image: url('/website_slides/static/src/img/slide_demo_tree_img_3.jpg'); background-position: 50% 0;"></span>
|
||||||
|
<div class="o_we_bg_filter bg-black-50"/>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row s_nb_column_fixed">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<h1 class="o_default_snippet_text display-3" style="text-align: center;">Foreword</h1>
|
||||||
|
<p class="lead o_default_snippet_text" style="text-align: center;">Write one or two paragraphs describing your product, services or a specific feature.<br/> To be successful your content needs to be useful to your readers.</p>
|
||||||
|
<p>
|
||||||
|
<a href="/contactus" class="btn btn-primary rounded-circle o_default_snippet_text">Contact us</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="s_text_image pt32 pb32" data-snippet="s_text_image">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-lg-6 pt16 pb16">
|
||||||
|
<img src="/website_slides/static/src/img/slide_demo_tree_img_1.jpg" class="img img-fluid mx-auto" alt="Odoo • Image and Text"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 pt16 pb16">
|
||||||
|
<h2 class="o_default_snippet_text">Section Subtitle</h2>
|
||||||
|
<p class="o_default_snippet_text">Write one or two paragraphs describing your product or services. <br/>To be successful your content needs to be useful to your readers.</p>
|
||||||
|
<p class="o_default_snippet_text">Start with the customer – find out what they want and give it to them.</p>
|
||||||
|
<p class="o_default_snippet_text"><a href="#" class="btn btn-outline-primary">Discover more</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section></field>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=6)"/>
|
||||||
|
<field name="is_preview" eval="True"/>
|
||||||
|
<field name="public_views">10</field>
|
||||||
|
<field name="completion_time">1</field>
|
||||||
|
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_howto'))]"/>
|
||||||
|
<field name="description">Foreword for this documentation: how to use it, main attention points</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_4_1" model="slide.slide">
|
||||||
|
<field name="name">Wood Types</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_thumb_bvSe6r5BpaY.jpg"/>
|
||||||
|
<field name="url">https://www.youtube.com/watch?v=bvSe6r5BpaY</field>
|
||||||
|
<field name="slide_category">video</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_4_furn1"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=3)"/>
|
||||||
|
<field name="is_preview" eval="False"/>
|
||||||
|
<field name="public_views">0</field>
|
||||||
|
<field name="completion_time">0.5</field>
|
||||||
|
<field name="description">Which wood type is best for my solid wood furniture? That's the question we help you answer in this video!</field>
|
||||||
|
</record>
|
||||||
|
<!-- Catgory: technical drawings -->
|
||||||
|
<record id="slide_slide_demo_4_10" model="slide.slide">
|
||||||
|
<field name="name">Drawing 1</field>
|
||||||
|
<field name="sequence">11</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_furniture_img.jpg"/>
|
||||||
|
<field name="slide_category">infographic</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_4_furn1"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=4)"/>
|
||||||
|
<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_theory'))]"/>
|
||||||
|
<field name="description">Technical drawing</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_4_11" model="slide.slide">
|
||||||
|
<field name="name">Drawing 2</field>
|
||||||
|
<field name="sequence">12</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_furniture_img_1.jpg"/>
|
||||||
|
<field name="slide_category">infographic</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_4_furn1"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=4)"/>
|
||||||
|
<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_theory'))]"/>
|
||||||
|
<field name="description">Technical drawing</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_4_12" model="slide.slide">
|
||||||
|
<field name="name">Presentation</field>
|
||||||
|
<field name="sequence">13</field>
|
||||||
|
<field name="binary_content" 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_category">document</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_4_furn1"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=4)"/>
|
||||||
|
<field name="is_preview" eval="False"/>
|
||||||
|
<field name="public_views">0</field>
|
||||||
|
<field name="completion_time">3</field>
|
||||||
|
<field name="tag_ids" eval="[(4, ref('website_slides.slide_tag_demo_howto'))]"/>
|
||||||
|
<field name="description">GLork</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- CHANNEL 5: Basics of Furniture Creation -->
|
||||||
|
<!-- ======================================= -->
|
||||||
|
|
||||||
|
<!-- Categories -->
|
||||||
|
<record id="slide_category_demo_5_0" model="slide.slide">
|
||||||
|
<field name="name">Tools and Methods</field>
|
||||||
|
<field name="is_category" eval="True"/>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/>
|
||||||
|
<field name="sequence">0</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="slide_category_demo_5_1" model="slide.slide">
|
||||||
|
<field name="name">Hand on!</field>
|
||||||
|
<field name="is_category" eval="True"/>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/>
|
||||||
|
<field name="sequence">3</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="slide_category_demo_5_2" model="slide.slide">
|
||||||
|
<field name="name">Test Yourself</field>
|
||||||
|
<field name="is_category" eval="True"/>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/>
|
||||||
|
<field name="sequence">5</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Slides -->
|
||||||
|
<record id="slide_slide_demo_5_0" model="slide.slide">
|
||||||
|
<field name="name">Unforgettable Tools</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
<field name="binary_content" 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"/>
|
||||||
|
<field name="slide_category">document</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="True"/>
|
||||||
|
<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'))]"/>
|
||||||
|
<field name="description">Tools you will need to complete this course.</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_5_0_link_0" model="slide.slide.resource">
|
||||||
|
<field name="resource_type">url</field>
|
||||||
|
<field name="name">Example Link 1</field>
|
||||||
|
<field name="link">http://www.example.com</field>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_5_0"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_5_0_link_1" model="slide.slide.resource">
|
||||||
|
<field name="resource_type">url</field>
|
||||||
|
<field name="name">Example Link 2</field>
|
||||||
|
<field name="link">http://www.example.com</field>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_5_0"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_5_1" model="slide.slide">
|
||||||
|
<field name="name">How to find quality wood</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_thumb_5WMqwTnZ-qs.jpg"/>
|
||||||
|
<field name="url">https://www.youtube.com/watch?v=5WMqwTnZ-qs</field>
|
||||||
|
<field name="slide_category">video</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="False"/>
|
||||||
|
<field name="public_views">0</field>
|
||||||
|
<field name="completion_time">3</field>
|
||||||
|
<field name="description">Learn to identify quality wood in order to create solid furnitures.</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_5_2" model="slide.slide">
|
||||||
|
<field name="name">How To Build a HIGH QUALITY Dining Table with LIMITED TOOLS</field>
|
||||||
|
<field name="sequence">4</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_thumb_grrXe1QZNzQ.jpg"/>
|
||||||
|
<field name="url">https://www.youtube.com/watch?v=grrXe1QZNzQ</field>
|
||||||
|
<field name="slide_category">video</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="True"/>
|
||||||
|
<field name="public_views">5</field>
|
||||||
|
<field name="completion_time">3</field>
|
||||||
|
<field name="description">From a piece of wood to a fully functional furniture, step by step.</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_5_3" model="slide.slide">
|
||||||
|
<field name="name">Test your knowledge!</field>
|
||||||
|
<field name="sequence">6</field>
|
||||||
|
<field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_owl.jpg"/>
|
||||||
|
<field name="slide_category">quiz</field>
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/>
|
||||||
|
<field name="is_published" eval="True"/>
|
||||||
|
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
|
||||||
|
<field name="is_preview" eval="False"/>
|
||||||
|
<field name="public_views">0</field>
|
||||||
|
<field name="completion_time">0.5</field>
|
||||||
|
<field name="description">Test your knowledge!</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_5_3_question_0" model="slide.question">
|
||||||
|
<field name="question">Do you want to reply correctly?</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
<field name="slide_id" ref="slide_slide_demo_5_3"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_5_3_question_0_0" model="slide.answer">
|
||||||
|
<field name="text_value">Yes</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
<field name="is_correct" eval="True"/>
|
||||||
|
<field name="comment">Correct! You did it!</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_5_3_question_0"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_demo_5_3_question_0_1" model="slide.answer">
|
||||||
|
<field name="text_value">No</field>
|
||||||
|
<field name="sequence">2</field>
|
||||||
|
<field name="is_correct" eval="False"/>
|
||||||
|
<field name="comment">Incorrect! You better think twice...</field>
|
||||||
|
<field name="question_id" ref="slide_slide_demo_5_3_question_0"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- CHANNEL 6: DIY Furniture -->
|
||||||
|
<!-- ======================================= -->
|
||||||
|
|
||||||
|
</data></odoo>
|
235
data/slide_user_demo.xml
Normal file
235
data/slide_user_demo.xml
Normal file
@ -0,0 +1,235 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo><data noupdate="1">
|
||||||
|
<!-- CHANNEL 0: Basics of Gardening -->
|
||||||
|
<!-- ================================================== -->
|
||||||
|
<!-- Note that admin is already member due to auto subscribe -->
|
||||||
|
<record id="slide_channel_0_partner_demo" model="slide.channel.partner">
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_0_partner_demo_portal" model="slide.channel.partner">
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo_portal"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_0_0_partner_admin" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_0_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_0_1_partner_admin" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_0_1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_0_partner_demo" model="slide.channel.partner">
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_0_0_partner_demo" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_0_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_0_1_partner_demo" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_0_1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_0_partner_demo_portal" model="slide.channel.partner">
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo_portal"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_0_0_partner_demo_portal" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_0_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo_portal"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="message_channel_0_admin" model="mail.message">
|
||||||
|
<field name="model">slide.channel</field>
|
||||||
|
<field name="res_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||||
|
<field name="message_type">comment</field>
|
||||||
|
<field name="author_id" ref="base.partner_admin"/>
|
||||||
|
<field name="body" type="html"><div>I fear beginners could be lost... Isn't it a bit harsh for a "basics" course?</div></field>
|
||||||
|
</record>
|
||||||
|
<record id="rating_channel_0_admin" model="rating.rating">
|
||||||
|
<field name="res_model_id" ref="website_slides.model_slide_channel"/>
|
||||||
|
<field name="res_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="consumed" eval="True"/>
|
||||||
|
<field name="feedback">I fear beginners could be lost... Isn't it a bit harsh for a "basics" course?</field>
|
||||||
|
<field name="rating">3</field>
|
||||||
|
<field name="message_id" ref="website_slides.message_channel_0_admin"/>
|
||||||
|
</record>
|
||||||
|
<record id="message_channel_0_demo" model="mail.message">
|
||||||
|
<field name="model">slide.channel</field>
|
||||||
|
<field name="res_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||||
|
<field name="message_type">comment</field>
|
||||||
|
<field name="author_id" ref="base.partner_demo"/>
|
||||||
|
<field name="body" type="html"><div>Back to basics and interesting. Just WOW!</div></field>
|
||||||
|
</record>
|
||||||
|
<record id="rating_channel_0_demo" model="rating.rating">
|
||||||
|
<field name="res_model_id" ref="website_slides.model_slide_channel"/>
|
||||||
|
<field name="res_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo"/>
|
||||||
|
<field name="consumed" eval="True"/>
|
||||||
|
<field name="rating">5</field>
|
||||||
|
<field name="feedback">Back to basics and interesting. Just WOW!</field>
|
||||||
|
<field name="message_id" ref="website_slides.message_channel_0_demo"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<function model="slide.channel" name="message_subscribe"
|
||||||
|
eval="[ref('website_slides.slide_channel_demo_0_gard_0')], [ref('base.partner_admin'), ref('base.partner_demo')]"/>
|
||||||
|
|
||||||
|
<!-- CHANNEL 1: Taking care of Trees -->
|
||||||
|
<!-- ================================================== -->
|
||||||
|
<!-- Note that admin is already member due to auto subscribe -->
|
||||||
|
<record id="slide_channel_1_partner_demo" model="slide.channel.partner">
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_1_partner_demo_portal" model="slide.channel.partner">
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo_portal"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_1_0_partner_admin" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_1_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_1_1_partner_admin" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_1_1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_1_2_partner_admin" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_1_2"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_1_3_partner_admin" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_1_3"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_1_partner_demo" model="slide.channel.partner">
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_1_0_partner_demo" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_1_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_1_1_partner_demo" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_1_1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
</record>
|
||||||
|
<record id="slide_channel_1_partner_demo_portal" model="slide.channel.partner">
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo_portal"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_1_0_partner_demo" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_1_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo_portal"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="message_channel_1_admin" model="mail.message">
|
||||||
|
<field name="model">slide.channel</field>
|
||||||
|
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||||
|
<field name="message_type">comment</field>
|
||||||
|
<field name="author_id" ref="base.partner_admin"/>
|
||||||
|
<field name="body" type="html"><div>Very good course.</div></field>
|
||||||
|
</record>
|
||||||
|
<record id="rating_channel_1_admin" model="rating.rating">
|
||||||
|
<field name="res_model_id" ref="website_slides.model_slide_channel"/>
|
||||||
|
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="consumed" eval="True"/>
|
||||||
|
<field name="feedback">Very good course.</field>
|
||||||
|
<field name="rating">5</field>
|
||||||
|
<field name="message_id" ref="website_slides.message_channel_1_admin"/>
|
||||||
|
</record>
|
||||||
|
<record id="message_channel_1_demo" model="mail.message">
|
||||||
|
<field name="model">slide.channel</field>
|
||||||
|
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||||
|
<field name="message_type">comment</field>
|
||||||
|
<field name="author_id" ref="base.partner_demo"/>
|
||||||
|
<field name="body" type="html"><div>Interesting!</div></field>
|
||||||
|
</record>
|
||||||
|
<record id="rating_channel_1_demo" model="rating.rating">
|
||||||
|
<field name="res_model_id" ref="website_slides.model_slide_channel"/>
|
||||||
|
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo"/>
|
||||||
|
<field name="consumed" eval="True"/>
|
||||||
|
<field name="rating">4</field>
|
||||||
|
<field name="feedback">Interesting!</field>
|
||||||
|
<field name="message_id" ref="website_slides.message_channel_1_demo"/>
|
||||||
|
</record>
|
||||||
|
<record id="message_channel_1_portal" model="mail.message">
|
||||||
|
<field name="model">slide.channel</field>
|
||||||
|
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||||
|
<field name="message_type">comment</field>
|
||||||
|
<field name="author_id" ref="base.partner_demo_portal"/>
|
||||||
|
<field name="body" type="html"><div>Interesting. Could be great to include more examples.</div></field>
|
||||||
|
</record>
|
||||||
|
<record id="rating_channel_1_portal" model="rating.rating">
|
||||||
|
<field name="res_model_id" ref="website_slides.model_slide_channel"/>
|
||||||
|
<field name="res_id" ref="website_slides.slide_channel_demo_1_gard1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo_portal"/>
|
||||||
|
<field name="consumed" eval="True"/>
|
||||||
|
<field name="rating">3</field>
|
||||||
|
<field name="feedback">Interesting. Could be great to include more examples.</field>
|
||||||
|
<field name="message_id" ref="website_slides.message_channel_1_portal"/>
|
||||||
|
<field name="publisher_comment">Thanks for the feedback! We just updated first lessons to better include newcomers.</field>
|
||||||
|
<field name="publisher_id" ref="base.partner_admin"/>
|
||||||
|
<field name="publisher_datetime" eval="(DateTime.today() - relativedelta(days=1)).strftime('%Y-%m-%d %H:%M')"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<function model="slide.channel" name="message_subscribe"
|
||||||
|
eval="[ref('website_slides.slide_channel_demo_1_gard1')], [ref('base.partner_admin'), ref('base.partner_demo')]"/>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- CHANNEL 2: Trees, Wood and Garden -->
|
||||||
|
<!-- ================================================== -->
|
||||||
|
<record id="slide_channel_2_partner_admin" model="slide.channel.partner">
|
||||||
|
<field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_2_0_partner_admin" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_2_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
<field name="quiz_attempts_count">1</field>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_2_1_partner_admin" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_2_1"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
</record>
|
||||||
|
<!-- note that partner demo is already member of slide_channel_demo_2_gard2 due to auto subscribe -->
|
||||||
|
<record id="slide_slide_2_0_partner_demo" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_2_0"/>
|
||||||
|
<field name="partner_id" ref="base.partner_demo"/>
|
||||||
|
<field name="vote">1</field>
|
||||||
|
<field name="quiz_attempts_count">2</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<function model="slide.channel" name="message_subscribe"
|
||||||
|
eval="[ref('website_slides.slide_channel_demo_2_gard2')], [ref('base.partner_admin'), ref('base.partner_demo')]"/>
|
||||||
|
|
||||||
|
</data></odoo>
|
42
data/slide_user_gamification_demo.xml
Normal file
42
data/slide_user_gamification_demo.xml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data noupdate="1">
|
||||||
|
<!-- Completion of Quiz and Karma Generation -->
|
||||||
|
<record id="slide_slide_1_4_partner_admin" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_1_4"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="quiz_attempts_count">1</field>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<function model="res.users" name="_add_karma">
|
||||||
|
<value eval="[ref('base.user_admin')]"/>
|
||||||
|
<value eval="20"/>
|
||||||
|
<value model="slide.slide" eval="obj().env.ref('website_slides.slide_slide_demo_1_4')"/>
|
||||||
|
<value>Quiz completed</value>
|
||||||
|
</function>
|
||||||
|
<!-- Completion of Course (Karma Generation Triggered in Python) -->
|
||||||
|
<record id="slide_slide_1_3_partner_admin" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_1_3"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<record id="slide_slide_1_5_partner_admin" model="slide.slide.partner">
|
||||||
|
<field name="slide_id" ref="website_slides.slide_slide_demo_1_5"/>
|
||||||
|
<field name="partner_id" ref="base.partner_admin"/>
|
||||||
|
<field name="completed" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<!-- Demo join and leave a course -->
|
||||||
|
<function model="res.users" name="_add_karma">
|
||||||
|
<value eval="[ref('base.user_demo')]"/>
|
||||||
|
<value eval="30"/>
|
||||||
|
<value model="slide.channel" eval="obj().env.ref('website_slides.slide_channel_demo_1_gard1')"/>
|
||||||
|
<value>Course Completed</value>
|
||||||
|
</function>
|
||||||
|
<function model="res.users" name="_add_karma">
|
||||||
|
<value eval="[ref('base.user_demo')]"/>
|
||||||
|
<value eval="-30"/>
|
||||||
|
<value model="slide.channel" eval="obj().env.ref('website_slides.slide_channel_demo_1_gard1')"/>
|
||||||
|
<value>Membership Removed</value>
|
||||||
|
</function>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
15
data/website_data.xml
Normal file
15
data/website_data.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data noupdate="1">
|
||||||
|
<record id="website.default_website" model="website">
|
||||||
|
<field name="website_slide_google_app_key">AIzaSyDOWlmDW-7DbLmOR9ZsT5AOEXf4n6TFwQA</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="website_menu_slides" model="website.menu">
|
||||||
|
<field name="name">Courses</field>
|
||||||
|
<field name="url">/slides</field>
|
||||||
|
<field name="parent_id" ref="website.main_menu"/>
|
||||||
|
<field name="sequence" type="int">50</field>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
6753
i18n/af.po
Normal file
6753
i18n/af.po
Normal file
File diff suppressed because it is too large
Load Diff
7381
i18n/ar.po
Normal file
7381
i18n/ar.po
Normal file
File diff suppressed because it is too large
Load Diff
6758
i18n/az.po
Normal file
6758
i18n/az.po
Normal file
File diff suppressed because it is too large
Load Diff
7070
i18n/bg.po
Normal file
7070
i18n/bg.po
Normal file
File diff suppressed because it is too large
Load Diff
6754
i18n/bs.po
Normal file
6754
i18n/bs.po
Normal file
File diff suppressed because it is too large
Load Diff
7326
i18n/ca.po
Normal file
7326
i18n/ca.po
Normal file
File diff suppressed because it is too large
Load Diff
7212
i18n/cs.po
Normal file
7212
i18n/cs.po
Normal file
File diff suppressed because it is too large
Load Diff
7169
i18n/da.po
Normal file
7169
i18n/da.po
Normal file
File diff suppressed because it is too large
Load Diff
7484
i18n/de.po
Normal file
7484
i18n/de.po
Normal file
File diff suppressed because it is too large
Load Diff
6756
i18n/el.po
Normal file
6756
i18n/el.po
Normal file
File diff suppressed because it is too large
Load Diff
6756
i18n/en_GB.po
Normal file
6756
i18n/en_GB.po
Normal file
File diff suppressed because it is too large
Load Diff
7451
i18n/es.po
Normal file
7451
i18n/es.po
Normal file
File diff suppressed because it is too large
Load Diff
7450
i18n/es_419.po
Normal file
7450
i18n/es_419.po
Normal file
File diff suppressed because it is too large
Load Diff
6751
i18n/es_CL.po
Normal file
6751
i18n/es_CL.po
Normal file
File diff suppressed because it is too large
Load Diff
6757
i18n/es_CO.po
Normal file
6757
i18n/es_CO.po
Normal file
File diff suppressed because it is too large
Load Diff
6751
i18n/es_CR.po
Normal file
6751
i18n/es_CR.po
Normal file
File diff suppressed because it is too large
Load Diff
6751
i18n/es_DO.po
Normal file
6751
i18n/es_DO.po
Normal file
File diff suppressed because it is too large
Load Diff
6758
i18n/es_EC.po
Normal file
6758
i18n/es_EC.po
Normal file
File diff suppressed because it is too large
Load Diff
6752
i18n/es_PE.po
Normal file
6752
i18n/es_PE.po
Normal file
File diff suppressed because it is too large
Load Diff
6751
i18n/es_PY.po
Normal file
6751
i18n/es_PY.po
Normal file
File diff suppressed because it is too large
Load Diff
6751
i18n/es_VE.po
Normal file
6751
i18n/es_VE.po
Normal file
File diff suppressed because it is too large
Load Diff
7171
i18n/et.po
Normal file
7171
i18n/et.po
Normal file
File diff suppressed because it is too large
Load Diff
6751
i18n/eu.po
Normal file
6751
i18n/eu.po
Normal file
File diff suppressed because it is too large
Load Diff
7086
i18n/fa.po
Normal file
7086
i18n/fa.po
Normal file
File diff suppressed because it is too large
Load Diff
7379
i18n/fi.po
Normal file
7379
i18n/fi.po
Normal file
File diff suppressed because it is too large
Load Diff
7464
i18n/fr.po
Normal file
7464
i18n/fr.po
Normal file
File diff suppressed because it is too large
Load Diff
6751
i18n/gl.po
Normal file
6751
i18n/gl.po
Normal file
File diff suppressed because it is too large
Load Diff
6760
i18n/gu.po
Normal file
6760
i18n/gu.po
Normal file
File diff suppressed because it is too large
Load Diff
7112
i18n/he.po
Normal file
7112
i18n/he.po
Normal file
File diff suppressed because it is too large
Load Diff
6774
i18n/hr.po
Normal file
6774
i18n/hr.po
Normal file
File diff suppressed because it is too large
Load Diff
7072
i18n/hu.po
Normal file
7072
i18n/hu.po
Normal file
File diff suppressed because it is too large
Load Diff
7435
i18n/id.po
Normal file
7435
i18n/id.po
Normal file
File diff suppressed because it is too large
Load Diff
6753
i18n/is.po
Normal file
6753
i18n/is.po
Normal file
File diff suppressed because it is too large
Load Diff
7437
i18n/it.po
Normal file
7437
i18n/it.po
Normal file
File diff suppressed because it is too large
Load Diff
7264
i18n/ja.po
Normal file
7264
i18n/ja.po
Normal file
File diff suppressed because it is too large
Load Diff
6751
i18n/ka.po
Normal file
6751
i18n/ka.po
Normal file
File diff suppressed because it is too large
Load Diff
6751
i18n/kab.po
Normal file
6751
i18n/kab.po
Normal file
File diff suppressed because it is too large
Load Diff
6756
i18n/km.po
Normal file
6756
i18n/km.po
Normal file
File diff suppressed because it is too large
Load Diff
7262
i18n/ko.po
Normal file
7262
i18n/ko.po
Normal file
File diff suppressed because it is too large
Load Diff
6753
i18n/lb.po
Normal file
6753
i18n/lb.po
Normal file
File diff suppressed because it is too large
Load Diff
7089
i18n/lt.po
Normal file
7089
i18n/lt.po
Normal file
File diff suppressed because it is too large
Load Diff
7073
i18n/lv.po
Normal file
7073
i18n/lv.po
Normal file
File diff suppressed because it is too large
Load Diff
6756
i18n/mk.po
Normal file
6756
i18n/mk.po
Normal file
File diff suppressed because it is too large
Load Diff
6774
i18n/mn.po
Normal file
6774
i18n/mn.po
Normal file
File diff suppressed because it is too large
Load Diff
6766
i18n/nb.po
Normal file
6766
i18n/nb.po
Normal file
File diff suppressed because it is too large
Load Diff
7427
i18n/nl.po
Normal file
7427
i18n/nl.po
Normal file
File diff suppressed because it is too large
Load Diff
7388
i18n/pl.po
Normal file
7388
i18n/pl.po
Normal file
File diff suppressed because it is too large
Load Diff
7059
i18n/pt.po
Normal file
7059
i18n/pt.po
Normal file
File diff suppressed because it is too large
Load Diff
7428
i18n/pt_BR.po
Normal file
7428
i18n/pt_BR.po
Normal file
File diff suppressed because it is too large
Load Diff
6805
i18n/ro.po
Normal file
6805
i18n/ro.po
Normal file
File diff suppressed because it is too large
Load Diff
7458
i18n/ru.po
Normal file
7458
i18n/ru.po
Normal file
File diff suppressed because it is too large
Load Diff
7077
i18n/sk.po
Normal file
7077
i18n/sk.po
Normal file
File diff suppressed because it is too large
Load Diff
7074
i18n/sl.po
Normal file
7074
i18n/sl.po
Normal file
File diff suppressed because it is too large
Load Diff
6751
i18n/sq.po
Normal file
6751
i18n/sq.po
Normal file
File diff suppressed because it is too large
Load Diff
7363
i18n/sr.po
Normal file
7363
i18n/sr.po
Normal file
File diff suppressed because it is too large
Load Diff
6755
i18n/sr@latin.po
Normal file
6755
i18n/sr@latin.po
Normal file
File diff suppressed because it is too large
Load Diff
7337
i18n/sv.po
Normal file
7337
i18n/sv.po
Normal file
File diff suppressed because it is too large
Load Diff
7368
i18n/th.po
Normal file
7368
i18n/th.po
Normal file
File diff suppressed because it is too large
Load Diff
7303
i18n/tr.po
Normal file
7303
i18n/tr.po
Normal file
File diff suppressed because it is too large
Load Diff
7364
i18n/uk.po
Normal file
7364
i18n/uk.po
Normal file
File diff suppressed because it is too large
Load Diff
7395
i18n/vi.po
Normal file
7395
i18n/vi.po
Normal file
File diff suppressed because it is too large
Load Diff
7047
i18n/website_slides.pot
Normal file
7047
i18n/website_slides.pot
Normal file
File diff suppressed because it is too large
Load Diff
7252
i18n/zh_CN.po
Normal file
7252
i18n/zh_CN.po
Normal file
File diff suppressed because it is too large
Load Diff
7232
i18n/zh_TW.po
Normal file
7232
i18n/zh_TW.po
Normal file
File diff suppressed because it is too large
Load Diff
15
models/__init__.py
Normal file
15
models/__init__.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from . import gamification_challenge
|
||||||
|
from . import gamification_karma_tracking
|
||||||
|
from . import slide_slide
|
||||||
|
from . import slide_question
|
||||||
|
from . import slide_embed
|
||||||
|
from . import slide_channel
|
||||||
|
from . import slide_channel_tag
|
||||||
|
from . import slide_slide_resource
|
||||||
|
from . import res_config_settings
|
||||||
|
from . import website
|
||||||
|
from . import res_users
|
||||||
|
from . import res_groups
|
||||||
|
from . import res_partner
|
12
models/gamification_challenge.py
Normal file
12
models/gamification_challenge.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import models, fields
|
||||||
|
|
||||||
|
|
||||||
|
class Challenge(models.Model):
|
||||||
|
_inherit = 'gamification.challenge'
|
||||||
|
|
||||||
|
challenge_category = fields.Selection(selection_add=[
|
||||||
|
('slides', 'Website / Slides')
|
||||||
|
], ondelete={'slides': 'set default'})
|
14
models/gamification_karma_tracking.py
Normal file
14
models/gamification_karma_tracking.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import _, models
|
||||||
|
|
||||||
|
|
||||||
|
class KarmaTracking(models.Model):
|
||||||
|
_inherit = 'gamification.karma.tracking'
|
||||||
|
|
||||||
|
def _get_origin_selection_values(self):
|
||||||
|
return (
|
||||||
|
super(KarmaTracking, self)._get_origin_selection_values()
|
||||||
|
+ [('slide.slide', _('Course Quiz')), ('slide.channel', self.env['ir.model']._get('slide.channel').display_name)]
|
||||||
|
)
|
14
models/res_config_settings.py
Normal file
14
models/res_config_settings.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class ResConfigSettings(models.TransientModel):
|
||||||
|
_inherit = "res.config.settings"
|
||||||
|
|
||||||
|
website_slide_google_app_key = fields.Char(related='website_id.website_slide_google_app_key', readonly=False)
|
||||||
|
module_website_sale_slides = fields.Boolean(string="Sell on eCommerce")
|
||||||
|
module_website_slides_forum = fields.Boolean(string="Forum")
|
||||||
|
module_website_slides_survey = fields.Boolean(string="Certifications")
|
||||||
|
module_mass_mailing_slides = fields.Boolean(string="Mailing")
|
16
models/res_groups.py
Normal file
16
models/res_groups.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import api, models
|
||||||
|
|
||||||
|
|
||||||
|
class UserGroup(models.Model):
|
||||||
|
_inherit = 'res.groups'
|
||||||
|
|
||||||
|
def write(self, vals):
|
||||||
|
""" Automatically subscribe new users to linked slide channels """
|
||||||
|
write_res = super(UserGroup, self).write(vals)
|
||||||
|
if vals.get('users'):
|
||||||
|
# TDE FIXME: maybe directly check users and subscribe them
|
||||||
|
self.env['slide.channel'].sudo().search([('enroll_group_ids', 'in', self._ids)])._add_groups_members()
|
||||||
|
return write_res
|
82
models/res_partner.py
Normal file
82
models/res_partner.py
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import api, fields, models, _
|
||||||
|
from odoo.osv import expression
|
||||||
|
|
||||||
|
|
||||||
|
class ResPartner(models.Model):
|
||||||
|
_inherit = 'res.partner'
|
||||||
|
|
||||||
|
slide_channel_ids = fields.Many2many(
|
||||||
|
'slide.channel', string='eLearning Courses',
|
||||||
|
compute='_compute_slide_channel_values',
|
||||||
|
search='_search_slide_channel_ids',
|
||||||
|
groups="website_slides.group_website_slides_officer")
|
||||||
|
slide_channel_completed_ids = fields.One2many(
|
||||||
|
'slide.channel', string='Completed Courses',
|
||||||
|
compute='_compute_slide_channel_values',
|
||||||
|
search='_search_slide_channel_completed_ids',
|
||||||
|
groups="website_slides.group_website_slides_officer")
|
||||||
|
slide_channel_count = fields.Integer(
|
||||||
|
'Course Count', compute='_compute_slide_channel_values',
|
||||||
|
groups="website_slides.group_website_slides_officer")
|
||||||
|
slide_channel_company_count = fields.Integer(
|
||||||
|
'Company Course Count', compute='_compute_slide_channel_company_count',
|
||||||
|
groups="website_slides.group_website_slides_officer")
|
||||||
|
|
||||||
|
def _compute_slide_channel_values(self):
|
||||||
|
data = {
|
||||||
|
(partner.id, member_status): channel_ids
|
||||||
|
for partner, member_status, channel_ids in self.env['slide.channel.partner'].sudo()._read_group(
|
||||||
|
domain=[('partner_id', 'in', self.ids), ('member_status', '!=', 'invited')],
|
||||||
|
groupby=['partner_id', 'member_status'],
|
||||||
|
aggregates=['channel_id:array_agg']
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
for partner in self:
|
||||||
|
slide_channel_ids = data.get((partner.id, 'joined'), []) + data.get((partner.id, 'ongoing'), []) + data.get((partner.id, 'completed'), [])
|
||||||
|
partner.slide_channel_ids = slide_channel_ids
|
||||||
|
partner.slide_channel_completed_ids = self.env['slide.channel'].browse(data.get((partner.id, 'completed'), []))
|
||||||
|
partner.slide_channel_count = len(slide_channel_ids)
|
||||||
|
|
||||||
|
def _search_slide_channel_completed_ids(self, operator, value):
|
||||||
|
cp_done = self.env['slide.channel.partner'].sudo().search([
|
||||||
|
('channel_id', operator, value),
|
||||||
|
('member_status', '=', 'completed')
|
||||||
|
])
|
||||||
|
return [('id', 'in', cp_done.partner_id.ids)]
|
||||||
|
|
||||||
|
def _search_slide_channel_ids(self, operator, value):
|
||||||
|
cp_enrolled = self.env['slide.channel.partner'].search([
|
||||||
|
('channel_id', operator, value),
|
||||||
|
('member_status', '!=', 'invited')
|
||||||
|
])
|
||||||
|
return [('id', 'in', cp_enrolled.partner_id.ids)]
|
||||||
|
|
||||||
|
@api.depends('is_company', 'child_ids.slide_channel_count')
|
||||||
|
def _compute_slide_channel_company_count(self):
|
||||||
|
for partner in self:
|
||||||
|
if partner.is_company:
|
||||||
|
partner.slide_channel_company_count = self.env['slide.channel'].sudo().search_count(
|
||||||
|
[('partner_ids', 'in', partner.child_ids.ids)]
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
partner.slide_channel_company_count = 0
|
||||||
|
|
||||||
|
def action_view_courses(self):
|
||||||
|
""" View partners courses. In singleton mode, return courses followed
|
||||||
|
by all its contacts (if company) or by themselves (if not a company).
|
||||||
|
Otherwise simply set a domain on required partners. The courses to which
|
||||||
|
the partner(s) is not enrolled (e.g. invited) are not shown. """
|
||||||
|
action = self.env["ir.actions.actions"]._for_xml_id("website_slides.slide_channel_partner_action")
|
||||||
|
action['display_name'] = _('Courses')
|
||||||
|
action['domain'] = [('member_status', '!=', 'invited')]
|
||||||
|
if len(self) == 1 and self.is_company:
|
||||||
|
action['domain'] = expression.AND([action['domain'], [('partner_id', 'in', self.child_ids.ids)]])
|
||||||
|
elif len(self) == 1:
|
||||||
|
action['context'] = {'search_default_partner_id': self.id}
|
||||||
|
else:
|
||||||
|
action['domain'] = expression.AND([action['domain'], [('partner_id', 'in', self.ids)]])
|
||||||
|
return action
|
36
models/res_users.py
Normal file
36
models/res_users.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import api, models, _
|
||||||
|
|
||||||
|
|
||||||
|
class Users(models.Model):
|
||||||
|
_inherit = 'res.users'
|
||||||
|
|
||||||
|
@api.model_create_multi
|
||||||
|
def create(self, vals_list):
|
||||||
|
""" Trigger automatic subscription based on user groups """
|
||||||
|
users = super(Users, self).create(vals_list)
|
||||||
|
for user in users:
|
||||||
|
self.env['slide.channel'].sudo().search([
|
||||||
|
('enroll_group_ids', 'in', user.groups_id.ids)
|
||||||
|
])._action_add_members(user.partner_id)
|
||||||
|
return users
|
||||||
|
|
||||||
|
def write(self, vals):
|
||||||
|
""" Trigger automatic subscription based on updated user groups """
|
||||||
|
res = super(Users, self).write(vals)
|
||||||
|
sanitized_vals = self._remove_reified_groups(vals)
|
||||||
|
if sanitized_vals.get('groups_id'):
|
||||||
|
added_group_ids = [command[1] for command in sanitized_vals['groups_id'] if command[0] == 4]
|
||||||
|
added_group_ids += [id for command in sanitized_vals['groups_id'] if command[0] == 6 for id in command[2]]
|
||||||
|
self.env['slide.channel'].sudo().search([('enroll_group_ids', 'in', added_group_ids)])._action_add_members(self.mapped('partner_id'))
|
||||||
|
return res
|
||||||
|
|
||||||
|
def get_gamification_redirection_data(self):
|
||||||
|
res = super(Users, self).get_gamification_redirection_data()
|
||||||
|
res.append({
|
||||||
|
'url': '/slides',
|
||||||
|
'label': _('See our eLearning')
|
||||||
|
})
|
||||||
|
return res
|
1271
models/slide_channel.py
Normal file
1271
models/slide_channel.py
Normal file
File diff suppressed because it is too large
Load Diff
37
models/slide_channel_tag.py
Normal file
37
models/slide_channel_tag.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from random import randint
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class SlideChannelTagGroup(models.Model):
|
||||||
|
_name = 'slide.channel.tag.group'
|
||||||
|
_description = 'Channel/Course Groups'
|
||||||
|
_inherit = 'website.published.mixin'
|
||||||
|
_order = 'sequence asc'
|
||||||
|
|
||||||
|
name = fields.Char('Group Name', required=True, translate=True)
|
||||||
|
sequence = fields.Integer('Sequence', default=10, index=True, required=True)
|
||||||
|
tag_ids = fields.One2many('slide.channel.tag', 'group_id', string='Tags')
|
||||||
|
|
||||||
|
def _default_is_published(self):
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
class SlideChannelTag(models.Model):
|
||||||
|
_name = 'slide.channel.tag'
|
||||||
|
_description = 'Channel/Course Tag'
|
||||||
|
_order = 'group_sequence asc, sequence asc'
|
||||||
|
|
||||||
|
name = fields.Char('Name', required=True, translate=True)
|
||||||
|
sequence = fields.Integer('Sequence', default=10, index=True, required=True)
|
||||||
|
group_id = fields.Many2one('slide.channel.tag.group', string='Group', index=True, required=True, ondelete="cascade")
|
||||||
|
group_sequence = fields.Integer(
|
||||||
|
'Group sequence', related='group_id.sequence',
|
||||||
|
index=True, readonly=True, store=True)
|
||||||
|
channel_ids = fields.Many2many('slide.channel', 'slide_channel_tag_rel', 'tag_id', 'channel_id', string='Channels')
|
||||||
|
color = fields.Integer(
|
||||||
|
string='Color Index', default=lambda self: randint(1, 11),
|
||||||
|
help="Tag color used in both backend and website. No color means no display in kanban or front-end, to distinguish internal tags from public categorization tags")
|
23
models/slide_embed.py
Normal file
23
models/slide_embed.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import _, api, fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class EmbeddedSlide(models.Model):
|
||||||
|
""" Embedding in third party websites. Track view count, generate statistics. """
|
||||||
|
_name = 'slide.embed'
|
||||||
|
_description = 'Embedded Slides View Counter'
|
||||||
|
_rec_name = 'website_name'
|
||||||
|
|
||||||
|
slide_id = fields.Many2one(
|
||||||
|
'slide.slide', string="Presentation",
|
||||||
|
required=True, index=True, ondelete='cascade')
|
||||||
|
url = fields.Char('Third Party Website URL')
|
||||||
|
website_name = fields.Char('Website', compute='_compute_website_name')
|
||||||
|
count_views = fields.Integer('# Views', default=1)
|
||||||
|
|
||||||
|
@api.depends('url')
|
||||||
|
def _compute_website_name(self):
|
||||||
|
for slide_embed in self:
|
||||||
|
slide_embed.website_name = slide_embed.url or _('Unknown Website')
|
71
models/slide_question.py
Normal file
71
models/slide_question.py
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import api, fields, models, _
|
||||||
|
from odoo.exceptions import ValidationError
|
||||||
|
|
||||||
|
|
||||||
|
class SlideQuestion(models.Model):
|
||||||
|
_name = "slide.question"
|
||||||
|
_rec_name = "question"
|
||||||
|
_description = "Content Quiz Question"
|
||||||
|
_order = "sequence"
|
||||||
|
|
||||||
|
sequence = fields.Integer("Sequence")
|
||||||
|
question = fields.Char("Question Name", required=True, translate=True)
|
||||||
|
slide_id = fields.Many2one('slide.slide', string="Content", required=True, ondelete='cascade')
|
||||||
|
answer_ids = fields.One2many('slide.answer', 'question_id', string="Answer", copy=True)
|
||||||
|
answers_validation_error = fields.Char("Error on Answers", compute='_compute_answers_validation_error')
|
||||||
|
# statistics
|
||||||
|
attempts_count = fields.Integer(compute='_compute_statistics', groups='website_slides.group_website_slides_officer')
|
||||||
|
attempts_avg = fields.Float(compute="_compute_statistics", digits=(6, 2), groups='website_slides.group_website_slides_officer')
|
||||||
|
done_count = fields.Integer(compute="_compute_statistics", groups='website_slides.group_website_slides_officer')
|
||||||
|
|
||||||
|
@api.constrains('answer_ids')
|
||||||
|
def _check_answers_integrity(self):
|
||||||
|
questions_to_fix = [
|
||||||
|
f'- {question.slide_id.name}: {question.question}'
|
||||||
|
for question in self
|
||||||
|
if question.answers_validation_error
|
||||||
|
]
|
||||||
|
if questions_to_fix:
|
||||||
|
raise ValidationError(_(
|
||||||
|
'All questions must have at least one correct answer and one incorrect answer: \n%s\n',
|
||||||
|
'\n'.join(questions_to_fix)))
|
||||||
|
|
||||||
|
@api.depends('slide_id')
|
||||||
|
def _compute_statistics(self):
|
||||||
|
slide_partners = self.env['slide.slide.partner'].sudo().search([('slide_id', 'in', self.slide_id.ids)])
|
||||||
|
slide_stats = dict((s.slide_id.id, dict({'attempts_count': 0, 'attempts_unique': 0, 'done_count': 0})) for s in slide_partners)
|
||||||
|
|
||||||
|
for slide_partner in slide_partners:
|
||||||
|
slide_stats[slide_partner.slide_id.id]['attempts_count'] += slide_partner.quiz_attempts_count
|
||||||
|
slide_stats[slide_partner.slide_id.id]['attempts_unique'] += 1
|
||||||
|
if slide_partner.completed:
|
||||||
|
slide_stats[slide_partner.slide_id.id]['done_count'] += 1
|
||||||
|
|
||||||
|
for question in self:
|
||||||
|
stats = slide_stats.get(question.slide_id.id)
|
||||||
|
question.attempts_count = stats.get('attempts_count', 0) if stats else 0
|
||||||
|
question.attempts_avg = stats.get('attempts_count', 0) / stats.get('attempts_unique', 1) if stats else 0
|
||||||
|
question.done_count = stats.get('done_count', 0) if stats else 0
|
||||||
|
|
||||||
|
@api.depends('answer_ids', 'answer_ids.is_correct')
|
||||||
|
def _compute_answers_validation_error(self):
|
||||||
|
for question in self:
|
||||||
|
correct = question.answer_ids.filtered('is_correct')
|
||||||
|
question.answers_validation_error = _(
|
||||||
|
'This question must have at least one correct answer and one incorrect answer.'
|
||||||
|
) if not correct or correct == question.answer_ids else ''
|
||||||
|
|
||||||
|
class SlideAnswer(models.Model):
|
||||||
|
_name = "slide.answer"
|
||||||
|
_rec_name = "text_value"
|
||||||
|
_description = "Slide Question's Answer"
|
||||||
|
_order = 'question_id, sequence, id'
|
||||||
|
|
||||||
|
sequence = fields.Integer("Sequence")
|
||||||
|
question_id = fields.Many2one('slide.question', string="Question", required=True, ondelete='cascade')
|
||||||
|
text_value = fields.Char("Answer", required=True, translate=True)
|
||||||
|
is_correct = fields.Boolean("Is correct answer")
|
||||||
|
comment = fields.Text("Comment", translate=True, help='This comment will be displayed to the user if they select this answer')
|
1403
models/slide_slide.py
Normal file
1403
models/slide_slide.py
Normal file
File diff suppressed because it is too large
Load Diff
67
models/slide_slide_resource.py
Normal file
67
models/slide_slide_resource.py
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from werkzeug.urls import url_encode
|
||||||
|
|
||||||
|
from odoo import api, fields, models, _
|
||||||
|
from odoo.exceptions import ValidationError
|
||||||
|
from odoo.tools.mimetypes import get_extension
|
||||||
|
|
||||||
|
|
||||||
|
class SlideResource(models.Model):
|
||||||
|
_name = 'slide.slide.resource'
|
||||||
|
_description = "Additional resource for a particular slide"
|
||||||
|
|
||||||
|
slide_id = fields.Many2one('slide.slide', required=True, ondelete='cascade')
|
||||||
|
resource_type = fields.Selection([('file', 'File'), ('url', 'Link')], required=True)
|
||||||
|
name = fields.Char('Name', compute="_compute_name", readonly=False, store=True)
|
||||||
|
data = fields.Binary('Resource', compute='_compute_reset_resources', store=True, readonly=False)
|
||||||
|
file_name = fields.Char(store=True)
|
||||||
|
link = fields.Char('Link', compute='_compute_reset_resources', store=True, readonly=False)
|
||||||
|
download_url = fields.Char('Download URL', compute='_compute_download_url')
|
||||||
|
|
||||||
|
_sql_constraints = [
|
||||||
|
('check_url', "CHECK (resource_type != 'url' OR link IS NOT NULL)", 'A resource of type url must contain a link.'),
|
||||||
|
('check_file_type', "CHECK (resource_type != 'file' OR link IS NULL)", 'A resource of type file cannot contain a link.'),
|
||||||
|
]
|
||||||
|
|
||||||
|
@api.depends('resource_type')
|
||||||
|
def _compute_reset_resources(self):
|
||||||
|
for resource in self:
|
||||||
|
if resource.resource_type == 'file':
|
||||||
|
resource.link = False
|
||||||
|
resource.data = resource.data
|
||||||
|
else:
|
||||||
|
resource.data = False
|
||||||
|
resource.link = resource.link
|
||||||
|
|
||||||
|
@api.depends('file_name', 'resource_type', 'data', 'link')
|
||||||
|
def _compute_name(self):
|
||||||
|
for resource in self:
|
||||||
|
to_update = not resource.name or resource.name == _("Resource")
|
||||||
|
if to_update:
|
||||||
|
new_name = _("Resource")
|
||||||
|
if resource.resource_type == 'file' and (resource.data or resource.file_name):
|
||||||
|
new_name = self.file_name
|
||||||
|
elif resource.resource_type == 'url':
|
||||||
|
new_name = self.link
|
||||||
|
resource.name = new_name
|
||||||
|
|
||||||
|
@api.depends('name', 'file_name')
|
||||||
|
def _compute_download_url(self):
|
||||||
|
for resource in self:
|
||||||
|
extension = get_extension(resource.file_name) if resource.file_name else ''
|
||||||
|
if not resource.name:
|
||||||
|
resource.download_url = False
|
||||||
|
continue
|
||||||
|
file_name = resource.name if resource.name.endswith(extension) else resource.name + extension
|
||||||
|
resource.download_url = f'/web/content/slide.slide.resource/{resource.id}/data?' + url_encode({
|
||||||
|
'download': 'true',
|
||||||
|
'filename': file_name,
|
||||||
|
})
|
||||||
|
|
||||||
|
@api.constrains('data')
|
||||||
|
def _check_link_type(self):
|
||||||
|
for record in self:
|
||||||
|
if record.resource_type != 'file' and record.data:
|
||||||
|
raise ValidationError(_("Resource %(resource_name)s is a link and should not contain a data file", resource_name=record.name))
|
24
models/website.py
Normal file
24
models/website.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import fields, models, _
|
||||||
|
from odoo.addons.http_routing.models.ir_http import url_for
|
||||||
|
|
||||||
|
|
||||||
|
class Website(models.Model):
|
||||||
|
_inherit = "website"
|
||||||
|
|
||||||
|
website_slide_google_app_key = fields.Char('Google Doc Key')
|
||||||
|
|
||||||
|
def get_suggested_controllers(self):
|
||||||
|
suggested_controllers = super(Website, self).get_suggested_controllers()
|
||||||
|
suggested_controllers.append((_('Courses'), url_for('/slides'), 'website_slides'))
|
||||||
|
return suggested_controllers
|
||||||
|
|
||||||
|
def _search_get_details(self, search_type, order, options):
|
||||||
|
result = super()._search_get_details(search_type, order, options)
|
||||||
|
if search_type in ['slides', 'slide_channels_only', 'all']:
|
||||||
|
result.append(self.env['slide.channel']._search_get_detail(self, order, options))
|
||||||
|
if search_type in ['slides', 'slides_only', 'all']:
|
||||||
|
result.append(self.env['slide.slide']._search_get_detail(self, order, options))
|
||||||
|
return result
|
4
populate/__init__.py
Normal file
4
populate/__init__.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from . import slide_channel
|
||||||
|
from . import slide_channel_partner
|
16
populate/slide_channel.py
Normal file
16
populate/slide_channel.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from odoo import models
|
||||||
|
from odoo.tools import populate
|
||||||
|
|
||||||
|
|
||||||
|
class SlideChannel(models.Model):
|
||||||
|
_inherit = 'slide.channel'
|
||||||
|
_populate_sizes = {'small': 2, 'medium': 8, 'large': 20}
|
||||||
|
|
||||||
|
def _populate_factories(self):
|
||||||
|
return [
|
||||||
|
('name', populate.constant('Course_{counter}')),
|
||||||
|
('description', populate.constant('This is course number {counter}')),
|
||||||
|
('website_published', populate.randomize([True, False], weights=[4, 1])),
|
||||||
|
]
|
51
populate/slide_channel_partner.py
Normal file
51
populate/slide_channel_partner.py
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from collections import defaultdict
|
||||||
|
|
||||||
|
from odoo import models
|
||||||
|
from odoo.tools import populate
|
||||||
|
|
||||||
|
|
||||||
|
class SlideChannelPartner(models.Model):
|
||||||
|
_inherit = 'slide.channel.partner'
|
||||||
|
_populate_dependencies = ['res.partner', 'slide.channel']
|
||||||
|
# 50% more than partners, so supports 0 to N courses per partner.
|
||||||
|
_populate_sizes = {'small': 150, 'medium': 3_000, 'large': 150_000}
|
||||||
|
|
||||||
|
def _populate_factories(self):
|
||||||
|
random = populate.Random('slidechannelpartners')
|
||||||
|
partner_ids = self.env.registry.populated_models['res.partner']
|
||||||
|
partner_not_company_ids = (
|
||||||
|
self.env['res.partner'].search([('id', 'in', partner_ids), ('is_company', '=', False)]).ids
|
||||||
|
)
|
||||||
|
channel_ids_set = set(self.env.registry.populated_models['slide.channel'])
|
||||||
|
attendees_partner_ids = partner_not_company_ids * len(channel_ids_set)
|
||||||
|
random.shuffle(attendees_partner_ids)
|
||||||
|
|
||||||
|
courses_weights = [1 / i for i in range(1, len(channel_ids_set) + 1)] # skewed for perf evals
|
||||||
|
|
||||||
|
def _compute_next_attendee(iterator, *args):
|
||||||
|
partners_channel_ids = defaultdict(set)
|
||||||
|
for values, partner_id in zip(iterator, attendees_partner_ids):
|
||||||
|
remaining_channel_ids = list(channel_ids_set - partners_channel_ids[partner_id])
|
||||||
|
channel_id = random.choices(
|
||||||
|
remaining_channel_ids,
|
||||||
|
weights=courses_weights[:len(remaining_channel_ids)],
|
||||||
|
k=1,
|
||||||
|
)[0]
|
||||||
|
|
||||||
|
partners_channel_ids[partner_id].add(channel_id)
|
||||||
|
|
||||||
|
yield {**values, 'partner_id': partner_id, 'channel_id': channel_id}
|
||||||
|
|
||||||
|
return [
|
||||||
|
('_attendee', _compute_next_attendee),
|
||||||
|
('active', populate.randomize([True, False], weights=[4, 1])),
|
||||||
|
(
|
||||||
|
'member_status',
|
||||||
|
populate.randomize(
|
||||||
|
['invited', 'joined', 'ongoing', 'completed'],
|
||||||
|
weights=[10, 50, 30, 20],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
42
security/ir.model.access.csv
Normal file
42
security/ir.model.access.csv
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
access_slide_slide_public,slide.slide.all,model_slide_slide,base.group_public,1,0,0,0
|
||||||
|
access_slide_slide_portal,slide.slide.all,model_slide_slide,base.group_portal,1,0,0,0
|
||||||
|
access_slide_slide_employee,slide.slide.all,model_slide_slide,base.group_user,1,0,0,0
|
||||||
|
access_slide_slide_officer,slide.slide.officer,model_slide_slide,website_slides.group_website_slides_officer,1,1,1,0
|
||||||
|
access_slide_slide_manager,slide.slide.manager,model_slide_slide,website_slides.group_website_slides_manager,1,1,1,1
|
||||||
|
access_slide_slide_partner_all,slide.slide.partner.all,model_slide_slide_partner,,0,0,0,0
|
||||||
|
access_slide_slide_partner_system,slide.slide.partner.system,model_slide_slide_partner,website_slides.group_website_slides_officer,1,1,1,1
|
||||||
|
access_slide_question_public,slide.question.all,model_slide_question,base.group_public,1,0,0,0
|
||||||
|
access_slide_question_portal,slide.question.all,model_slide_question,base.group_portal,1,0,0,0
|
||||||
|
access_slide_question_employee,slide.question.all,model_slide_question,base.group_user,1,0,0,0
|
||||||
|
access_slide_question_officer,slide.question.officer,model_slide_question,website_slides.group_website_slides_officer,1,1,1,1
|
||||||
|
access_slide_answer_all,slide.answer.all,model_slide_answer,,0,0,0,0
|
||||||
|
access_slide_answer_officer,slide.answer.officer,model_slide_answer,website_slides.group_website_slides_officer,1,1,1,1
|
||||||
|
access_slide_tag_public,slide.tag.all,model_slide_tag,base.group_public,1,0,0,0
|
||||||
|
access_slide_tag_portal,slide.tag.all,model_slide_tag,base.group_portal,1,0,0,0
|
||||||
|
access_slide_tag_employee,slide.tag.all,model_slide_tag,base.group_user,1,0,0,0
|
||||||
|
access_slide_tag_officer,slide.tag.officer,model_slide_tag,website_slides.group_website_slides_officer,1,1,1,1
|
||||||
|
access_slide_channel_tag_public,slide.channel.tag.all,model_slide_channel_tag,base.group_public,1,0,0,0
|
||||||
|
access_slide_channel_tag_portal,slide.channel.tag.all,model_slide_channel_tag,base.group_portal,1,0,0,0
|
||||||
|
access_slide_channel_tag_employee,slide.channel.tag.all,model_slide_channel_tag,base.group_user,1,0,0,0
|
||||||
|
access_slide_channel_tag_user,slide.channel.tag.user,model_slide_channel_tag,website_slides.group_website_slides_officer,1,1,1,1
|
||||||
|
access_slide_channel_tag_group_public,slide.channel.tag.group.all,model_slide_channel_tag_group,base.group_public,1,0,0,0
|
||||||
|
access_slide_channel_tag_group_portal,slide.channel.tag.group.all,model_slide_channel_tag_group,base.group_portal,1,0,0,0
|
||||||
|
access_slide_channel_tag_group_employee,slide.channel.tag.group.all,model_slide_channel_tag_group,base.group_user,1,0,0,0
|
||||||
|
access_slide_channel_tag_group_user,slide.channel.tag.group.user,model_slide_channel_tag_group,website_slides.group_website_slides_officer,1,1,1,1
|
||||||
|
access_slide_channel_public,slide.channel.all,model_slide_channel,base.group_public,1,0,0,0
|
||||||
|
access_slide_channel_portal,slide.channel.all,model_slide_channel,base.group_portal,1,0,0,0
|
||||||
|
access_slide_channel_employee,slide.channel.all,model_slide_channel,base.group_user,1,0,0,0
|
||||||
|
access_slide_channel_officer,slide.channel.officer,model_slide_channel,website_slides.group_website_slides_officer,1,1,1,0
|
||||||
|
access_slide_channel_manager,slide.channel.manager,model_slide_channel,website_slides.group_website_slides_manager,1,1,1,1
|
||||||
|
access_slide_channel_partners_all,slide.channel.users.all,model_slide_channel_partner,,0,0,0,0
|
||||||
|
access_slide_channel_partners_system,slide.channel.users.system,model_slide_channel_partner,website_slides.group_website_slides_officer,1,1,1,1
|
||||||
|
access_slide_embed_public,slide.embed.all,model_slide_embed,base.group_public,1,0,0,0
|
||||||
|
access_slide_embed_portal,slide.embed.all,model_slide_embed,base.group_portal,1,0,0,0
|
||||||
|
access_slide_embed_user,slide.embed.user,model_slide_embed,base.group_user,1,1,1,1
|
||||||
|
access_slide_slide_resource_all,slide.slide.resource.all,model_slide_slide_resource,,0,0,0,0
|
||||||
|
access_slide_slide_resource_public,slide.slide.resource.public,model_slide_slide_resource,base.group_public,0,0,0,0
|
||||||
|
access_slide_slide_resource_portal,slide.slide.resource.portal,model_slide_slide_resource,base.group_portal,1,0,0,0
|
||||||
|
access_slide_slide_resource_internal,slide.slide.resource.internal,model_slide_slide_resource,base.group_user,1,0,0,0
|
||||||
|
access_slide_slide_resource_publisher,slide.slide.resource.publisher,model_slide_slide_resource,website_slides.group_website_slides_officer,1,1,1,1
|
||||||
|
access_slide_channel_invite,access.slide.channel.invite,model_slide_channel_invite,base.group_user,1,1,1,0
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user