From ffe119d03ec667334360be6ab2d923632aa5cc7f Mon Sep 17 00:00:00 2001 From: "jerome hanke (jhk)" Date: Mon, 27 Apr 2020 08:43:00 +0000 Subject: [PATCH] [FIX] website_slides: leaving a course unsubs from the related channel Steps to reproduce: - install eLearning - go to the website > courses > enroll in any course > leave the course Previous behavior: you are not unsubscribed from the slide channel and still receive mail notifications Current behavior: you are unsubscribed from the channel when you leave the course opw-2244716 closes odoo/odoo#50404 X-original-commit: cb262738a20fad3e5114e9df21b77f499347745e Signed-off-by: Nicolas Lempereur (nle) Signed-off-by: mightyjol --- addons/website_slides/models/slide_channel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/website_slides/models/slide_channel.py b/addons/website_slides/models/slide_channel.py index 8a2bac24b5d..34b5bc0fcd9 100644 --- a/addons/website_slides/models/slide_channel.py +++ b/addons/website_slides/models/slide_channel.py @@ -567,6 +567,7 @@ class Channel(models.Model): [('partner_id', 'in', partner_ids), ('channel_id', '=', channel.id)] ]) + self.message_unsubscribe(partner_ids=partner_ids) if removed_channel_partner_domain: self.env['slide.channel.partner'].sudo().search(removed_channel_partner_domain).unlink()