summaryrefslogtreecommitdiff
path: root/addons/website_slides/models/slide_slide.py
diff options
context:
space:
mode:
authorqmo-odoo <qmo@odoo.com>2019-05-08 13:08:18 +0000
committerThibault Delavallée <tde@odoo.com>2019-08-08 08:29:34 +0000
commit340613d068d9a6a06eb5e126d8c3e935f99babff (patch)
tree473458022d1b3c24396dfaf84b11bfe31550e614 /addons/website_slides/models/slide_slide.py
parentb180c66a80ae3ae34716f8524a990c9e9d2c1aa7 (diff)
[REF] website_slides: revamp channel form view
PURPOSE Like already done for sale order, invoice of survey, purpose of this commit is to remove category model and replace by a flagged line (slide). It allows to easily reorder slides in an embedded list view. SPECIFICATIONS This commit completely reworks the slide.channel form view * improve the content management from the form itself by adding a tree view with the possibility of drag and dropping slides from category to category. This tree view has buttons to quickly add content or certification. It also allow to add a category (slide with flag is_category) without opening a modal; * reorder tabs and fields, improve some labels; * add a custom float field widget to display ratings as stars; * add stat button for partners who completed/certified ;the course * add stat button that redirects to the forum posts; * add stat button that redirects to the channel reviews; LINKS Task 1978731 PR #33255
Diffstat (limited to 'addons/website_slides/models/slide_slide.py')
-rw-r--r--addons/website_slides/models/slide_slide.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_slides/models/slide_slide.py b/addons/website_slides/models/slide_slide.py
index e9ebe039886..4292665d870 100644
--- a/addons/website_slides/models/slide_slide.py
+++ b/addons/website_slides/models/slide_slide.py
@@ -105,7 +105,7 @@ class Slide(models.Model):
channel_id = fields.Many2one('slide.channel', string="Channel", required=True)
tag_ids = fields.Many2many('slide.tag', 'rel_slide_tag', 'slide_id', 'tag_id', string='Tags')
is_preview = fields.Boolean('Is Preview', default=False, help="The course is accessible by anyone : the users don't need to join the channel to access the content of the course.")
- completion_time = fields.Float('# Hours', default=1, digits=(10, 4))
+ completion_time = fields.Float('Duration', default=1, digits=(10, 2))
# Categories
is_category = fields.Boolean('Is a category', default=False)
category_id = fields.Many2one('slide.slide', string="Category", compute="_compute_category_id", store=True)
@@ -152,7 +152,7 @@ class Slide(models.Model):
embedcount_ids = fields.One2many('slide.embed', 'slide_id', string="Embed Count")
slide_views = fields.Integer('# of Website Views', store=True, compute="_compute_slide_views")
public_views = fields.Integer('# of Public Views')
- total_views = fields.Integer("Total # Views", default="0", compute='_compute_total', store=True)
+ total_views = fields.Integer("Views", default="0", compute='_compute_total', store=True)
# comments
comments_count = fields.Integer('Number of comments', compute="_compute_comments_count")
# channel