From 43740f94eae7f4c44a778f636c0fc4efbd57b662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 7 Feb 2019 11:24:57 +0000 Subject: [PATCH] [IMP] website_slides: add dependency on website profile Purpose is to prepare the use of gamification tools in slides. In this commit we add the dependency on website_profile (gamification front-end) in slides and add the slides category on challenges. Partial commit linked to eLearning project. Main specifications related to gamification and user profile can be found on task 1922159 (PR #30514). Main specifications related to eLearning can be found on task 1902304 (PR #29876). Co-Authored-By: David Beguin Co-Authored-By: Thibault Delavallee --- addons/website_slides/__manifest__.py | 6 +++++- addons/website_slides/models/__init__.py | 1 + addons/website_slides/models/gamification_challenge.py | 10 ++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 addons/website_slides/models/gamification_challenge.py diff --git a/addons/website_slides/__manifest__.py b/addons/website_slides/__manifest__.py index 3900ec08d58..b24100651b2 100644 --- a/addons/website_slides/__manifest__.py +++ b/addons/website_slides/__manifest__.py @@ -17,7 +17,11 @@ Share and Publish Videos, Presentations and Documents' * Channel Subscription * Supported document types : PDF, images, YouTube videos and Google Drive documents) """, - 'depends': ['website', 'website_mail', 'website_rating'], + 'depends': [ + 'website', + 'website_mail', + 'website_profile', + 'website_rating'], 'data': [ 'views/assets.xml', 'views/res_config_settings_views.xml', diff --git a/addons/website_slides/models/__init__.py b/addons/website_slides/models/__init__.py index e64510d2710..c0bc050e663 100644 --- a/addons/website_slides/models/__init__.py +++ b/addons/website_slides/models/__init__.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from . import gamification_challenge from . import slide_slide from . import slide_channel from . import res_config_settings diff --git a/addons/website_slides/models/gamification_challenge.py b/addons/website_slides/models/gamification_challenge.py new file mode 100644 index 00000000000..aa492e9b7cb --- /dev/null +++ b/addons/website_slides/models/gamification_challenge.py @@ -0,0 +1,10 @@ +# -*- 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' + + category = fields.Selection(selection_add=[('slides', 'Website / Slides')])