From 799126f340e2a172c2f803ee13147e2b8579a386 Mon Sep 17 00:00:00 2001 From: duongnguyen Date: Mon, 23 Oct 2023 09:41:43 +0700 Subject: [PATCH] [FIX] web_chatter_position: special case of sided chatter pos in mass mailing module - Because the chatter in mass mailing form view lie under a notebook tab, if user choose sided chatter, it will disappear --- .../static/src/js/web_chatter_position.esm.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web_chatter_position/static/src/js/web_chatter_position.esm.js b/web_chatter_position/static/src/js/web_chatter_position.esm.js index 6e323db07..43425c1d6 100644 --- a/web_chatter_position/static/src/js/web_chatter_position.esm.js +++ b/web_chatter_position/static/src/js/web_chatter_position.esm.js @@ -113,6 +113,10 @@ patch(FormCompiler.prototype, "web_chatter_position", { // For "sided", we have to remote the bottom chatter // (except if there is an attachment viewer, as we have to force bottom) } else if (odoo.web_chatter_position === "sided") { + const formSheetBgXml = res.querySelector(".o_form_sheet_bg"); + if (!formSheetBgXml) { + return res; + } chatterContainerHookXml.setAttribute("t-if", false); // For "bottom", we keep the chatter in the form sheet // (the one used for the attachment viewer case)