From 18ba2befab939c44fd479bd10256bd1424176a60 Mon Sep 17 00:00:00 2001 From: Priyanka Kakadiya Date: Wed, 17 Feb 2021 12:20:25 +0000 Subject: [PATCH] [FIX] mail: notification not sent when using the full composer Current behavior before PR: mail notification not sent when using the full composer. Desired behavior after PR is merged: mail notification will send when using the full composer. LINKS: PR https://github.com/odoo/odoo/pull/66421 Task-2446855 closes odoo/odoo#67933 X-original-commit: 349f07670ea4938e7fc3d9fa3a6fc5fae40dac65 Signed-off-by: Thibault Delavallee (tde) --- addons/mail/models/mail_thread.py | 2 +- addons/test_mail/tests/test_performance.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index 5e606a5c473..97313b06cc8 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -1792,7 +1792,7 @@ class MailThread(models.AbstractModel): if subtype_xmlid: subtype_id = self.env['ir.model.data'].xmlid_to_res_id(subtype_xmlid) if not subtype_id: - subtype_id = self.env['ir.model.data'].xmlid_to_res_id('mail_mt_note') + subtype_id = self.env['ir.model.data'].xmlid_to_res_id('mail.mt_note') # automatically subscribe recipients if asked to if self._context.get('mail_post_autofollow') and partner_ids: diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index ff4749c98ee..0edd404c16d 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -932,7 +932,7 @@ class TestMailHeavyPerformancePost(BaseMailPerformance): ] self.attachements = self.env['ir.attachment'].with_user(self.env.user).create(self.vals) attachement_ids = self.attachements.ids - with self.assertQueryCount(emp=65): + with self.assertQueryCount(emp=66): self.cr.sql_log = self.warm and self.cr.sql_log_count record.with_context({}).message_post( body='

Test body

',