[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
This commit is contained in:
duongnguyen
2023-10-23 09:41:43 +07:00
committed by ellbristow
parent 1fb9fd9bd6
commit c0a52b0bfe
4 changed files with 7 additions and 3 deletions

View File

@@ -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

View File

@@ -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",

View File

@@ -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
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/16.0/web_chatter_position"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_chatter_position"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Configurable chatter position from the user preferences.</p>

View File

@@ -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)