From 8f93369d83c7bc8c707332c59b07d532dc0346db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 25 Aug 2017 15:19:06 +0200 Subject: [PATCH] [FIX] portal: fix frontend chatter move Commit 3cfd64f63f6153c170c9c876fa65976a95da22cb moved the frontend chatter from a website-based module website_mail to portal. Purpose was to allow its use in customer portal independently from the website. However some renaming done during the move was not properly propagated resulting in the chatter not being loaded. This commit fixes that by correctly using the new class node as well as widget name when instantiating the widget. --- addons/portal/__manifest__.py | 5 ++++- addons/portal/static/src/js/portal_chatter.js | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/portal/__manifest__.py b/addons/portal/__manifest__.py index c57c80433a0..d932cb2f025 100644 --- a/addons/portal/__manifest__.py +++ b/addons/portal/__manifest__.py @@ -15,11 +15,14 @@ portal. This module contains most code coming from odoo v10 website_portal. Purpose of this module is to allow the display of a customer portal without having a dependency towards website edition and customization capabilities.""", + 'depends': ['http_routing', 'mail'], 'data': [ 'data/portal_data.xml', 'views/assets.xml', 'views/portal_templates.xml', 'wizard/portal_wizard_views.xml', ], - 'depends': ['http_routing', 'mail'], + 'qweb': [ + 'static/src/xml/portal_chatter.xml', + ], } diff --git a/addons/portal/static/src/js/portal_chatter.js b/addons/portal/static/src/js/portal_chatter.js index bfb44837bf4..5aeab9bcf31 100644 --- a/addons/portal/static/src/js/portal_chatter.js +++ b/addons/portal/static/src/js/portal_chatter.js @@ -224,9 +224,9 @@ var PortalChatter = Widget.extend({ }); base.ready().then(function () { - $('.o_website_mail_thread').each(function (index) { + $('.o_portal_chatter').each(function (index) { var $elem = $(this); - var mail_thread = new WebsiteMailThread(null, $elem.data()); + var mail_thread = new PortalChatter(null, $elem.data()); mail_thread.appendTo($elem); }); });