From e1f1767491affaac1be54e17c3d15abc8390f099 Mon Sep 17 00:00:00 2001 From: Jay Savaliya Date: Mon, 5 Jun 2023 13:21:28 +0000 Subject: [PATCH] [FIX] website_slides: prevent auto-marking videos complete When user will open the video in any course, it will be marked as completed directly which behaves like any other content(pdf, image). This behavior was introduced when 'slide_view' was modified in https://github.com/odoo/odoo/commit/4c291fe30468dab7cef9d2e5a0377c78484f5045, but in the case of video, it must not be marked as completed before the video is watched up until(near) the end, as per the previous behavior. Task-3346507 closes odoo/odoo#125128 X-original-commit: 488ce25425f71733abc3aa7b32f299d6abf48055 Signed-off-by: Thibault Delavallee (tde) --- addons/website_slides/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py index 74ea26da58a..fc8a7247a32 100644 --- a/addons/website_slides/controllers/main.py +++ b/addons/website_slides/controllers/main.py @@ -933,7 +933,7 @@ class WebsiteSlides(WebsiteProfile): return request.redirect(slide.channel_id.website_url) if slide.can_self_mark_completed and not slide.user_has_completed \ - and slide.channel_id.channel_type == 'training': + and slide.channel_id.channel_type == 'training' and slide.slide_category != 'video': self._slide_mark_completed(slide) else: self._set_viewed_slide(slide)