From 76bd362e34ddfa162c0730b6e08194a3e911aeee Mon Sep 17 00:00:00 2001 From: tsm-odoo Date: Tue, 8 Aug 2023 11:48:42 +0000 Subject: [PATCH] [FIX] mail: no follower spinner on draft record Before this commit, the follower loading spinner was shown for draft records until it was saved. This is incorrect, follower count should instead be 0. This commit fixes this issue. closes odoo/odoo#131224 Signed-off-by: Didier Debondt (did) --- addons/mail/static/src/core/web/chatter.xml | 6 +++--- addons/mail/static/tests/web/chatter_tests.js | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/addons/mail/static/src/core/web/chatter.xml b/addons/mail/static/src/core/web/chatter.xml index da450ff7752..8bbf02def69 100644 --- a/addons/mail/static/src/core/web/chatter.xml +++ b/addons/mail/static/src/core/web/chatter.xml @@ -34,9 +34,9 @@ - - - + + + diff --git a/addons/mail/static/tests/web/chatter_tests.js b/addons/mail/static/tests/web/chatter_tests.js index c0875f41b35..065ccacfd89 100644 --- a/addons/mail/static/tests/web/chatter_tests.js +++ b/addons/mail/static/tests/web/chatter_tests.js @@ -761,3 +761,9 @@ QUnit.test("upload attachment on draft record", async (assert) => { await afterNextRender(() => dropFiles($(".o-mail-Dropzone")[0], [file])); await waitUntil("button[aria-label='Attach files']:contains(1)"); }); + +QUnit.test("Follower count of draft record is set to 0", async (assert) => { + const { openView } = await start(); + await openView({ res_model: "res.partner", views: [[false, "form"]] }); + assert.containsOnce($, ".o-mail-Followers:contains(0)"); +});