From c0a52b0bfec2f389a5b54c14381c4c11322cf5be 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 --- web_chatter_position/README.rst | 2 +- web_chatter_position/__manifest__.py | 2 +- web_chatter_position/static/description/index.html | 2 +- .../static/src/js/web_chatter_position.esm.js | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/web_chatter_position/README.rst b/web_chatter_position/README.rst index fa584e705..79555092a 100644 --- a/web_chatter_position/README.rst +++ b/web_chatter_position/README.rst @@ -7,7 +7,7 @@ Chatter Position !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:5d3f60eeecdac91c06a5eefec0c19386e9913235723472b54a3dd73cf4aac596 + !! source digest: sha256:fbb006a9a99fbcf94cbb8823017ff08050ed9294fd3c81929e4a4b2e225ca61b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/web_chatter_position/__manifest__.py b/web_chatter_position/__manifest__.py index 763e36cf4..4318d9da4 100644 --- a/web_chatter_position/__manifest__.py +++ b/web_chatter_position/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Chatter Position", "summary": "Add an option to change the chatter position", - "version": "16.0.1.0.1", + "version": "16.0.1.0.2", "author": "Hynsys Technologies, Camptocamp, Odoo Community Association (OCA)", "website": "https://github.com/OCA/web", "license": "LGPL-3", diff --git a/web_chatter_position/static/description/index.html b/web_chatter_position/static/description/index.html index fac0d24de..71e5669fe 100644 --- a/web_chatter_position/static/description/index.html +++ b/web_chatter_position/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:5d3f60eeecdac91c06a5eefec0c19386e9913235723472b54a3dd73cf4aac596 +!! source digest: sha256:fbb006a9a99fbcf94cbb8823017ff08050ed9294fd3c81929e4a4b2e225ca61b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/web Translate me on Weblate Try me on Runboat

Configurable chatter position from the user preferences.

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)