From 1da252d0a3a79ce4d68b129d330fdd1a88d907b5 Mon Sep 17 00:00:00 2001 From: "Didier (did)" Date: Thu, 29 Oct 2020 09:41:43 +0000 Subject: [PATCH] [FIX] mail: backport fix from the required field PR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/odoo/enterprise/pull/13883 task-2323665 closes odoo/odoo#61320 X-original-commit: 7ead0bf2e3e15ec161415bfa270a2c42a66fbbe3 Related: odoo/enterprise#14585 Signed-off-by: Sébastien Theys (seb) --- .../composer_suggestion/composer_suggestion_channel_tests.js | 3 +++ .../src/components/discuss/tests/discuss_moderation_tests.js | 2 +- .../static/src/components/activity/activity_tests.js | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/mail/static/src/components/composer_suggestion/composer_suggestion_channel_tests.js b/addons/mail/static/src/components/composer_suggestion/composer_suggestion_channel_tests.js index f8409de2da9..047fc997b49 100644 --- a/addons/mail/static/src/components/composer_suggestion/composer_suggestion_channel_tests.js +++ b/addons/mail/static/src/components/composer_suggestion/composer_suggestion_channel_tests.js @@ -50,6 +50,7 @@ QUnit.test('channel mention suggestion displayed', async function (assert) { const channel = this.env.models['mail.thread'].create({ id: 7, name: "General", + model: 'mail.channel', }); await this.createComposerSuggestion({ composerLocalId: thread.composer.localId, @@ -77,6 +78,7 @@ QUnit.test('channel mention suggestion correct data', async function (assert) { const channel = this.env.models['mail.thread'].create({ id: 7, name: "General", + model: 'mail.channel', }); await this.createComposerSuggestion({ composerLocalId: thread.composer.localId, @@ -114,6 +116,7 @@ QUnit.test('partner mention suggestion active', async function (assert) { const channel = this.env.models['mail.thread'].create({ id: 7, name: "General", + model: 'mail.channel', }); await this.createComposerSuggestion({ composerLocalId: thread.composer.localId, diff --git a/addons/mail/static/src/components/discuss/tests/discuss_moderation_tests.js b/addons/mail/static/src/components/discuss/tests/discuss_moderation_tests.js index 04ca8b08e18..2afd997a42b 100644 --- a/addons/mail/static/src/components/discuss/tests/discuss_moderation_tests.js +++ b/addons/mail/static/src/components/discuss/tests/discuss_moderation_tests.js @@ -986,7 +986,7 @@ QUnit.test('as moderator, new pending moderation message posted by someone else' // simulate receiving the message const messageData = { - author_id: 10, // random id, different than current partner + author_id: [10, 'john doe'], // random id, different than current partner body: "not empty", channel_ids: [], // server do NOT return channel_id of the message if pending moderation id: 1, // random unique id diff --git a/addons/website_slides/static/src/components/activity/activity_tests.js b/addons/website_slides/static/src/components/activity/activity_tests.js index d8e465a4237..d754428cf62 100644 --- a/addons/website_slides/static/src/components/activity/activity_tests.js +++ b/addons/website_slides/static/src/components/activity/activity_tests.js @@ -55,6 +55,7 @@ QUnit.test('grant course access', async function (assert) { }, }); const activity = this.env.models['mail.activity'].create({ + id: 100, canWrite: true, thread: [['insert', { id: 100, @@ -94,6 +95,7 @@ QUnit.test('refuse course access', async function (assert) { }, }); const activity = this.env.models['mail.activity'].create({ + id: 100, canWrite: true, thread: [['insert', { id: 100,