From fed3a1c2ae8e49d8d5410656f26ed70c70c45f5e Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Wed, 15 Sep 2021 08:10:44 +0000 Subject: [PATCH] [IMP] mail: add MainComponentsContainer to guest pages Previously, guest would not get any error dialogs when errors were occuring, while the error service and dialog service were correctly deployed, they were missing the main components container which allows the dialog service to display the currently opened dialogs. The main components container also allows the norification and popover services to work, allowing them to be used for future developments if needed. X-original-commit: 2a73d441babee25343bf09b5e1a6513afb084c92 Part-of: odoo/odoo#76616 --- addons/mail/__manifest__.py | 3 ++- addons/mail/static/src/public/discuss_public_boot.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/mail/__manifest__.py b/addons/mail/__manifest__.py index 620176edcf4..fc30295d663 100644 --- a/addons/mail/__manifest__.py +++ b/addons/mail/__manifest__.py @@ -70,6 +70,7 @@ 'web/static/src/legacy/scss/bootstrap_review.scss', 'web/static/src/webclient/webclient.scss', 'web/static/src/webclient/webclient_extra.scss', + 'web/static/src/core/utils/*.scss', # Dependency of notification_group, notification_request, thread_needaction_preview and thread_preview 'mail/static/src/components/notification_list/notification_list_item.scss', 'mail/static/src/component_hooks/*/*.js', @@ -90,7 +91,7 @@ 'bus/static/src/js/services/bus_service.js', 'web/static/lib/luxon/luxon.js', 'web/static/lib/py.js/lib/py.js', - 'web/static/src/core/**/*.js', + 'web/static/src/core/**/*', ('remove', 'web/static/src/core/debug/**/*.[js][scss]'), 'web/static/src/env.js', 'web/static/src/legacy/js/_deprecated/basic_fields.js', diff --git a/addons/mail/static/src/public/discuss_public_boot.js b/addons/mail/static/src/public/discuss_public_boot.js index a39574a4c9c..31b9c21c2b7 100644 --- a/addons/mail/static/src/public/discuss_public_boot.js +++ b/addons/mail/static/src/public/discuss_public_boot.js @@ -5,6 +5,7 @@ import { MessagingService } from '@mail/services/messaging/messaging'; import { getMessagingComponent } from '@mail/utils/messaging_component'; import { processTemplates } from '@web/core/assets'; +import { MainComponentsContainer } from '@web/core/main_components_container'; import { registry } from '@web/core/registry'; import { makeEnv, startServices } from '@web/env'; import { session } from '@web/session'; @@ -58,6 +59,7 @@ export async function boot() { autofetchPartnerImStatus: false, }, })); + await owl.mount(MainComponentsContainer, { env, target: document.body }); async function createThreadViewFromChannelData(channelData) { const messaging = await owl.Component.env.services.messaging.get();