From 532fd0471881fdeef8561e8c18442e5ed0f26475 Mon Sep 17 00:00:00 2001 From: anhe-odoo Date: Mon, 18 Oct 2021 08:05:05 +0000 Subject: [PATCH] [FIX] mail: chatter in chat window should log notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expected Behaviour When a user reply to a mention (on an invoice, a client profile, ...) in a log_note, and this user answers directly in the chatbox, the answer should be considered as an internal discussion, and so be posted as a log_note. Observed behaviour Since V12, when a user reply in the chatbox, the reply is automatically set as a "send-message" reply, which is a issue as the user sends an email to all followers of the discussion while he probably thinks his answer will be visible only by the internal users. Reproducibility This bug can be reproduced following these steps: 1. Declare at least 2 users (A and B) and make sure user A handles notifications in Odoo 2. Log as user B, go anywhere in Odoo as user B and mention the user A in a log_note 3. Log as user A, open the mention notification and reply in the chatbox 4. The answer will be noted as a send-message answer, sending then e-mails to all followers ... Problem Root Cause As long as the V12 isn't supported anymore, we didn't investigate this version. In V13, the issue comes from the fact the chatbox didn't use the same composer class as the discussion module, and then it's not possible to send a log note from the chatbox. In V14, as the discussion module has been totally refactored, the "error" comes from the arbitrary choice to set "false" as the default value of "isLog" on a general message, which implies that the answer from the chatbox is considered as a "send-message" and not as a "log-note". Related tickets opw-2602712 opw-2659484 closes odoo/odoo#78565 X-original-commit: 9e62872561f9914beac8f58f5c3ebed83cd9defc Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/models/composer/composer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/models/composer/composer.js b/addons/mail/static/src/models/composer/composer.js index 719ac051174..27482c1c4ab 100644 --- a/addons/mail/static/src/models/composer/composer.js +++ b/addons/mail/static/src/models/composer/composer.js @@ -172,7 +172,7 @@ function factory(dependencies) { * If true composer will log a note, else a comment will be posted. */ isLog: attr({ - default: false, + default: true, }), /** * Determines whether a post_message request is currently pending.