diff --git a/addons/hr/static/src/models/employee/employee.js b/addons/hr/static/src/models/employee/employee.js
index 208ccc26a87..5c37022a3ba 100644
--- a/addons/hr/static/src/models/employee/employee.js
+++ b/addons/hr/static/src/models/employee/employee.js
@@ -100,7 +100,7 @@ registerModel({
*
* If a chat is not appropriate, a notification is displayed instead.
*
- * @returns {mail.thread|undefined}
+ * @returns {Thread|undefined}
*/
async getChat() {
if (!this.user && !this.hasCheckedUser) {
@@ -122,8 +122,8 @@ registerModel({
*
* If a chat is not appropriate, a notification is displayed instead.
*
- * @param {Object} [options] forwarded to @see `mail.thread:open()`
- * @returns {mail.thread|undefined}
+ * @param {Object} [options] forwarded to @see `Thread:open()`
+ * @returns {Thread|undefined}
*/
async openChat(options) {
const chat = await this.async(() => this.getChat());
diff --git a/addons/hr_holidays/static/src/components/thread_icon/tests/thread_icon_tests.js b/addons/hr_holidays/static/src/components/thread_icon/tests/thread_icon_tests.js
index b9253de72c8..78125ee3e93 100644
--- a/addons/hr_holidays/static/src/components/thread_icon/tests/thread_icon_tests.js
+++ b/addons/hr_holidays/static/src/components/thread_icon/tests/thread_icon_tests.js
@@ -49,7 +49,7 @@ QUnit.test('thread icon of a chat when correspondent is on leave & online', asyn
members: [this.data.currentPartnerId, 7],
});
await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -81,7 +81,7 @@ QUnit.test('thread icon of a chat when correspondent is on leave & away', async
members: [this.data.currentPartnerId, 7],
});
await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -113,7 +113,7 @@ QUnit.test('thread icon of a chat when correspondent is on leave & offline', asy
members: [this.data.currentPartnerId, 7],
});
await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
diff --git a/addons/hr_holidays/static/src/components/thread_view/tests/thread_view_tests.js b/addons/hr_holidays/static/src/components/thread_view/tests/thread_view_tests.js
index 579900618c2..dff2c32cea1 100644
--- a/addons/hr_holidays/static/src/components/thread_view/tests/thread_view_tests.js
+++ b/addons/hr_holidays/static/src/components/thread_view/tests/thread_view_tests.js
@@ -46,7 +46,7 @@ QUnit.test('out of office message on direct chat with out of office partner', as
members: [this.data.currentPartnerId, 11],
}];
const { createThreadViewComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel'
});
diff --git a/addons/im_livechat/static/src/components/composer/tests/composer_tests.js b/addons/im_livechat/static/src/components/composer/tests/composer_tests.js
index d91f61b2240..34f3018ab1a 100644
--- a/addons/im_livechat/static/src/components/composer/tests/composer_tests.js
+++ b/addons/im_livechat/static/src/components/composer/tests/composer_tests.js
@@ -28,7 +28,7 @@ QUnit.test('livechat: no add attachment button', async function (assert) {
assert.expect(2);
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].create({
+ const thread = this.messaging.models['Thread'].create({
channel_type: 'livechat',
id: 10,
model: 'mail.channel',
diff --git a/addons/im_livechat/static/src/components/discuss/tests/discuss_tests.js b/addons/im_livechat/static/src/components/discuss/tests/discuss_tests.js
index cd452a41898..5d9b736e3cf 100644
--- a/addons/im_livechat/static/src/components/discuss/tests/discuss_tests.js
+++ b/addons/im_livechat/static/src/components/discuss/tests/discuss_tests.js
@@ -58,7 +58,7 @@ QUnit.test('livechat in the sidebar: basic rendering', async function (assert) {
);
const livechat = groupLivechat.querySelector(`
.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -278,11 +278,11 @@ QUnit.test('livechats are sorted by last activity time in the sidebar: most rece
},
);
await this.start();
- const livechat11 = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const livechat11 = this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
});
- const livechat12 = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const livechat12 = this.messaging.models['Thread'].findFromIdentifyingData({
id: 12,
model: 'mail.channel',
});
diff --git a/addons/im_livechat/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js b/addons/im_livechat/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js
index 19fa00a03f0..68d932f71a2 100644
--- a/addons/im_livechat/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js
+++ b/addons/im_livechat/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js
@@ -132,7 +132,7 @@ QUnit.test('livechat - states: close manually by clicking the title', async func
assert.containsOnce(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -149,7 +149,7 @@ QUnit.test('livechat - states: close manually by clicking the title', async func
assert.containsNone(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -177,7 +177,7 @@ QUnit.test('livechat - states: open manually by clicking the title', async funct
assert.containsNone(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -194,7 +194,7 @@ QUnit.test('livechat - states: open manually by clicking the title', async funct
assert.containsOnce(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -310,7 +310,7 @@ QUnit.test('livechat - states: close from the bus', async function (assert) {
assert.containsOnce(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -328,7 +328,7 @@ QUnit.test('livechat - states: close from the bus', async function (assert) {
assert.containsNone(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -356,7 +356,7 @@ QUnit.test('livechat - states: open from the bus', async function (assert) {
assert.containsNone(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -374,7 +374,7 @@ QUnit.test('livechat - states: open from the bus', async function (assert) {
assert.containsOnce(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -399,7 +399,7 @@ QUnit.test('livechat - states: category item should be invisible if the catgory
assert.containsOnce(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -416,7 +416,7 @@ QUnit.test('livechat - states: category item should be invisible if the catgory
assert.containsNone(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -440,7 +440,7 @@ QUnit.test('livechat - states: the active category item should be visble even if
assert.containsOnce(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -448,7 +448,7 @@ QUnit.test('livechat - states: the active category item should be visble even if
);
const livechat = document.querySelector(`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -468,7 +468,7 @@ QUnit.test('livechat - states: the active category item should be visble even if
assert.containsOnce(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
diff --git a/addons/im_livechat/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js b/addons/im_livechat/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js
index 7f51844051d..a853e345f9d 100644
--- a/addons/im_livechat/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js
+++ b/addons/im_livechat/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js
@@ -42,7 +42,7 @@ QUnit.test('livechat - avatar: should have a smiley face avatar for an anonymous
const livechatItem = document.querySelector(`
.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -77,7 +77,7 @@ QUnit.test('livechat - avatar: should have a partner profile picture for a livec
const livechatItem = document.querySelector(`
.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
diff --git a/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js b/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js
index 6b988ee921f..cf200c187f5 100644
--- a/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js
+++ b/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js
@@ -66,7 +66,7 @@ QUnit.test('livechats should be in "chat" filter', async function (assert) {
assert.containsOnce(
document.body,
`.o_ThreadPreview[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -85,7 +85,7 @@ QUnit.test('livechats should be in "chat" filter', async function (assert) {
assert.containsOnce(
document.body,
`.o_ThreadPreview[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
diff --git a/addons/im_livechat/static/src/components/notification_list/notification_list.js b/addons/im_livechat/static/src/components/notification_list/notification_list.js
index dd8fcc36911..10499b86249 100644
--- a/addons/im_livechat/static/src/components/notification_list/notification_list.js
+++ b/addons/im_livechat/static/src/components/notification_list/notification_list.js
@@ -20,7 +20,7 @@ patch(components.NotificationList.prototype, 'im_livechat/static/src/components/
*/
_getThreads(props) {
if (props.filter === 'livechat') {
- return this.messaging.models['mail.thread'].all(thread =>
+ return this.messaging.models['Thread'].all(thread =>
thread.channel_type === 'livechat' &&
thread.isPinned &&
thread.model === 'mail.channel'
diff --git a/addons/im_livechat/static/src/components/thread_icon/tests/thread_icon_tests.js b/addons/im_livechat/static/src/components/thread_icon/tests/thread_icon_tests.js
index 0df8552b0ec..c96af73221a 100644
--- a/addons/im_livechat/static/src/components/thread_icon/tests/thread_icon_tests.js
+++ b/addons/im_livechat/static/src/components/thread_icon/tests/thread_icon_tests.js
@@ -46,7 +46,7 @@ QUnit.test('livechat: public website visitor is typing', async function (assert)
members: [this.data.currentPartnerId, this.data.publicPartnerId],
});
await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
diff --git a/addons/im_livechat/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js b/addons/im_livechat/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js
index 4edfb967e31..0b5a69803b0 100644
--- a/addons/im_livechat/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js
+++ b/addons/im_livechat/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js
@@ -46,7 +46,7 @@ QUnit.test('receive visitor typing status "is typing"', async function (assert)
members: [this.data.currentPartnerId, this.data.publicPartnerId],
});
await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
diff --git a/addons/im_livechat/static/src/models/messaging_notification_handler/messaging_notification_handler.js b/addons/im_livechat/static/src/models/messaging_notification_handler/messaging_notification_handler.js
index 19cf469496c..bcf44370f1f 100644
--- a/addons/im_livechat/static/src/models/messaging_notification_handler/messaging_notification_handler.js
+++ b/addons/im_livechat/static/src/models/messaging_notification_handler/messaging_notification_handler.js
@@ -22,7 +22,7 @@ patchRecordMethods('MessagingNotificationHandler', {
* @override
*/
_handleNotificationChannelPartnerTypingStatus({ channel_id, is_typing, partner_id, partner_name }) {
- const channel = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const channel = this.messaging.models['Thread'].findFromIdentifyingData({
id: channel_id,
model: 'mail.channel',
});
diff --git a/addons/im_livechat/static/src/models/thread/thread.js b/addons/im_livechat/static/src/models/thread/thread.js
index 6edf90c66c0..c7352189960 100644
--- a/addons/im_livechat/static/src/models/thread/thread.js
+++ b/addons/im_livechat/static/src/models/thread/thread.js
@@ -5,7 +5,7 @@ import { insert, link, unlink } from '@mail/model/model_field_command';
// ensure that the model definition is loaded before the patch
import '@mail/models/thread/thread';
-patchModelMethods('mail.thread', {
+patchModelMethods('Thread', {
/**
* @override
*/
@@ -52,7 +52,7 @@ patchModelMethods('mail.thread', {
},
});
-patchRecordMethods('mail.thread', {
+patchRecordMethods('Thread', {
/**
* @override
*/
diff --git a/addons/mail/static/src/components/attachment_box/tests/attachment_box_tests.js b/addons/mail/static/src/components/attachment_box/tests/attachment_box_tests.js
index 513534c5cb5..b23e61f010b 100644
--- a/addons/mail/static/src/components/attachment_box/tests/attachment_box_tests.js
+++ b/addons/mail/static/src/components/attachment_box/tests/attachment_box_tests.js
@@ -57,7 +57,7 @@ QUnit.test('base empty rendering', async function (assert) {
this.data['res.partner'].records.push({ id: 100 });
await this.start();
- const thread = this.messaging.models['mail.thread'].create({
+ const thread = this.messaging.models['Thread'].create({
id: 100,
model: 'res.partner',
});
@@ -110,7 +110,7 @@ QUnit.test('base non-empty rendering', async function (assert) {
return this._super(...arguments);
},
});
- const thread = this.messaging.models['mail.thread'].create({
+ const thread = this.messaging.models['Thread'].create({
id: 100,
model: 'res.partner',
});
@@ -146,7 +146,7 @@ QUnit.test('attachment box: drop attachments', async function (assert) {
this.data['res.partner'].records.push({ id: 100 });
await this.start();
- const thread = this.messaging.models['mail.thread'].create({
+ const thread = this.messaging.models['Thread'].create({
id: 100,
model: 'res.partner',
});
@@ -224,7 +224,7 @@ QUnit.test('view attachments', async function (assert) {
await this.start({
hasDialog: true,
});
- const thread = this.messaging.models['mail.thread'].create({
+ const thread = this.messaging.models['Thread'].create({
attachments: [
insert({
id: 143,
@@ -299,7 +299,7 @@ QUnit.test('remove attachment should ask for confirmation', async function (asse
this.data['res.partner'].records.push({ id: 100 });
await this.start();
- const thread = this.messaging.models['mail.thread'].create({
+ const thread = this.messaging.models['Thread'].create({
attachments: insert({
id: 143,
mimetype: 'text/plain',
diff --git a/addons/mail/static/src/components/channel_member_list/channel_member_list.js b/addons/mail/static/src/components/channel_member_list/channel_member_list.js
index 753c556c894..58a713e677a 100644
--- a/addons/mail/static/src/components/channel_member_list/channel_member_list.js
+++ b/addons/mail/static/src/components/channel_member_list/channel_member_list.js
@@ -7,10 +7,10 @@ const { Component } = owl;
export class ChannelMemberList extends Component {
/**
- * @returns {mail.thread}
+ * @returns {Thread}
*/
get channel() {
- return this.messaging.models['mail.thread'].get(this.props.channelLocalId);
+ return this.messaging.models['Thread'].get(this.props.channelLocalId);
}
}
diff --git a/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js b/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js
index c5be8007fb0..d19ffdacfc3 100644
--- a/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js
+++ b/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js
@@ -479,7 +479,7 @@ QUnit.test('chat window: basic rendering', async function (assert) {
const chatWindow = document.querySelector(`.o_ChatWindow`);
assert.strictEqual(
chatWindow.dataset.threadLocalId,
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId,
@@ -1094,7 +1094,7 @@ QUnit.test('open 2 different chat windows: enough screen width [REQUIRE FOCUS]',
document.querySelector(`
.o_MessagingMenu_dropdownMenu
.o_NotificationList_preview[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -1109,7 +1109,7 @@ QUnit.test('open 2 different chat windows: enough screen width [REQUIRE FOCUS]',
assert.strictEqual(
document.querySelectorAll(`
.o_ChatWindow[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -1121,7 +1121,7 @@ QUnit.test('open 2 different chat windows: enough screen width [REQUIRE FOCUS]',
assert.ok(
document.querySelector(`
.o_ChatWindow[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -1135,7 +1135,7 @@ QUnit.test('open 2 different chat windows: enough screen width [REQUIRE FOCUS]',
document.querySelector(`
.o_MessagingMenu_dropdownMenu
.o_NotificationList_preview[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId
@@ -1150,7 +1150,7 @@ QUnit.test('open 2 different chat windows: enough screen width [REQUIRE FOCUS]',
assert.strictEqual(
document.querySelectorAll(`
.o_ChatWindow[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId
@@ -1162,7 +1162,7 @@ QUnit.test('open 2 different chat windows: enough screen width [REQUIRE FOCUS]',
assert.strictEqual(
document.querySelectorAll(`
.o_ChatWindow[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -1174,7 +1174,7 @@ QUnit.test('open 2 different chat windows: enough screen width [REQUIRE FOCUS]',
assert.ok(
document.querySelector(`
.o_ChatWindow[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId
@@ -1185,7 +1185,7 @@ QUnit.test('open 2 different chat windows: enough screen width [REQUIRE FOCUS]',
assert.notOk(
document.querySelector(`
.o_ChatWindow[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -1445,7 +1445,7 @@ QUnit.test('open 3 different chat windows: not enough screen width', async funct
document.querySelector(`
.o_MessagingMenu_dropdownMenu
.o_NotificationList_preview[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 1,
model: 'mail.channel',
}).localId
@@ -1475,7 +1475,7 @@ QUnit.test('open 3 different chat windows: not enough screen width', async funct
document.querySelector(`
.o_MessagingMenu_dropdownMenu
.o_NotificationList_preview[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 2,
model: 'mail.channel',
}).localId
@@ -1505,7 +1505,7 @@ QUnit.test('open 3 different chat windows: not enough screen width', async funct
document.querySelector(`
.o_MessagingMenu_dropdownMenu
.o_NotificationList_preview[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 3,
model: 'mail.channel',
}).localId
@@ -1530,7 +1530,7 @@ QUnit.test('open 3 different chat windows: not enough screen width', async funct
assert.strictEqual(
document.querySelectorAll(`
.o_ChatWindow[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 1,
model: 'mail.channel',
}).localId
@@ -1542,7 +1542,7 @@ QUnit.test('open 3 different chat windows: not enough screen width', async funct
assert.strictEqual(
document.querySelectorAll(`
.o_ChatWindow[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 3,
model: 'mail.channel',
}).localId
@@ -1554,7 +1554,7 @@ QUnit.test('open 3 different chat windows: not enough screen width', async funct
assert.ok(
document.querySelector(`
.o_ChatWindow[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 3,
model: 'mail.channel',
}).localId
@@ -1583,7 +1583,7 @@ QUnit.test('chat window: switch on TAB', async function (assert) {
document.querySelector(`
.o_MessagingMenu_dropdownMenu
.o_NotificationList_preview[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 1,
model: 'mail.channel',
}).localId
@@ -1624,7 +1624,7 @@ QUnit.test('chat window: switch on TAB', async function (assert) {
document.querySelector(`
.o_MessagingMenu_dropdownMenu
.o_NotificationList_preview[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 2,
model: 'mail.channel',
}).localId
@@ -2129,7 +2129,7 @@ QUnit.test('chat window does not fetch messages if hidden', async function (asse
assert.containsNone(
document.body,
`.o_ChatWindow[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 12,
model: 'mail.channel',
}).localId
@@ -2167,7 +2167,7 @@ QUnit.test('chat window does not fetch messages if hidden', async function (asse
assert.containsOnce(
document.body,
`.o_ChatWindow[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 12,
model: 'mail.channel',
}).localId
diff --git a/addons/mail/static/src/components/chatter/tests/chatter_tests.js b/addons/mail/static/src/components/chatter/tests/chatter_tests.js
index 77f18c0903d..0f543a53be4 100644
--- a/addons/mail/static/src/components/chatter/tests/chatter_tests.js
+++ b/addons/mail/static/src/components/chatter/tests/chatter_tests.js
@@ -77,7 +77,7 @@ QUnit.test('base rendering when chatter has no attachment', async function (asse
);
assert.strictEqual(
document.querySelector(`.o_Chatter_thread`).dataset.threadLocalId,
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 100,
model: 'res.partner',
}).localId,
@@ -351,7 +351,7 @@ QUnit.test('should display subject when subject is not the same as the thread na
subject: "Salutations, voyageur",
});
await this.start();
- this.messaging.models['mail.thread'].create({
+ this.messaging.models['Thread'].create({
id: 100,
model: 'res.partner',
name: "voyageur",
@@ -386,7 +386,7 @@ QUnit.test('should not display subject when subject is the same as the thread na
subject: "Salutations, voyageur",
});
await this.start();
- this.messaging.models['mail.thread'].create({
+ this.messaging.models['Thread'].create({
id: 100,
model: 'res.partner',
name: "Salutations, voyageur",
diff --git a/addons/mail/static/src/components/composer/tests/composer_tests.js b/addons/mail/static/src/components/composer/tests/composer_tests.js
index 134bc8fe518..c7ef81996f8 100644
--- a/addons/mail/static/src/components/composer/tests/composer_tests.js
+++ b/addons/mail/static/src/components/composer/tests/composer_tests.js
@@ -45,7 +45,7 @@ QUnit.test('composer text input: basic rendering when posting a message', async
assert.expect(5);
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].create({
+ const thread = this.messaging.models['Thread'].create({
composer: insertAndReplace({ isLog: false }),
id: 20,
model: 'res.partner',
@@ -81,7 +81,7 @@ QUnit.test('composer text input: basic rendering when logging note', async funct
assert.expect(5);
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].create({
+ const thread = this.messaging.models['Thread'].create({
composer: insertAndReplace({ isLog: true }),
id: 20,
model: 'res.partner',
@@ -118,7 +118,7 @@ QUnit.test('composer text input: basic rendering when linked thread is a mail.ch
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -153,7 +153,7 @@ QUnit.test('composer text input placeholder should contain channel name when thr
name: 'General',
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -175,7 +175,7 @@ QUnit.test('composer text input placeholder should contain correspondent name wh
members: [this.data.currentPartnerId, 7],
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -194,7 +194,7 @@ QUnit.test('add an emoji', async function (assert) {
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -223,7 +223,7 @@ QUnit.test('add an emoji after some text', async function (assert) {
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -260,7 +260,7 @@ QUnit.test('add emoji replaces (keyboard) text selection', async function (asser
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -308,7 +308,7 @@ QUnit.test('display canned response suggestions on typing ":"', async function (
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -347,7 +347,7 @@ QUnit.test('use a canned response', async function (assert) {
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -399,7 +399,7 @@ QUnit.test('use a canned response some text', async function (assert) {
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -459,7 +459,7 @@ QUnit.test('add an emoji after a canned response', async function (assert) {
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -523,7 +523,7 @@ QUnit.test('display channel mention suggestions on typing "#"', async function (
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 7,
model: 'mail.channel',
});
@@ -558,7 +558,7 @@ QUnit.test('mention a channel', async function (assert) {
public: "groups",
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 7,
model: 'mail.channel',
});
@@ -606,7 +606,7 @@ QUnit.test('mention a channel after some text', async function (assert) {
public: "groups",
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 7,
model: 'mail.channel',
});
@@ -662,7 +662,7 @@ QUnit.test('add an emoji after a channel mention', async function (assert) {
public: "groups",
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 7,
model: 'mail.channel',
});
@@ -721,7 +721,7 @@ QUnit.test('display command suggestions on typing "/"', async function (assert)
this.data['mail.channel'].records.push({ channel_type: 'channel', id: 20 });
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -759,7 +759,7 @@ QUnit.test('do not send typing notification on typing "/" command', async functi
return this._super(...arguments);
},
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -788,7 +788,7 @@ QUnit.test('do not send typing notification on typing after selecting suggestion
return this._super(...arguments);
},
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -821,7 +821,7 @@ QUnit.test('use a command for a specific channel type', async function (assert)
this.data['mail.channel'].records.push({ channel_type: 'channel', id: 20 });
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -860,7 +860,7 @@ QUnit.test('command suggestion should only open if command is the first characte
this.data['mail.channel'].records.push({ channel_type: 'channel', id: 20 });
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -903,7 +903,7 @@ QUnit.test('add an emoji after a command', async function (assert) {
this.data['mail.channel'].records.push({ channel_type: 'channel', id: 20 });
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -973,7 +973,7 @@ QUnit.test('display partner mention suggestions on typing "@"', async function (
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1015,7 +1015,7 @@ QUnit.test('mention a partner', async function (assert) {
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1075,7 +1075,7 @@ QUnit.test('mention a partner after some text', async function (assert) {
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1144,7 +1144,7 @@ QUnit.test('add an emoji after a partner mention', async function (assert) {
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1215,7 +1215,7 @@ QUnit.test('composer: add an attachment', async function (assert) {
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1249,7 +1249,7 @@ QUnit.test('composer: drop attachments', async function (assert) {
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1316,7 +1316,7 @@ QUnit.test('composer: paste attachments', async function (assert) {
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1358,7 +1358,7 @@ QUnit.test('composer text input cleared on message post', async function (assert
return this._super(...arguments);
},
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1393,7 +1393,7 @@ QUnit.test('composer with thread typing notification status', async function (as
// with a random unique id that will be referenced in the test
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1425,7 +1425,7 @@ QUnit.test('current partner notify is typing to other thread members', async fun
return this._super(...arguments);
},
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1457,7 +1457,7 @@ QUnit.test('current partner is typing should not translate on textual typing sta
return this._super(...arguments);
},
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1496,7 +1496,7 @@ QUnit.test('current partner notify no longer is typing to thread members after 5
return this._super(...arguments);
},
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1534,7 +1534,7 @@ QUnit.test('current partner notify is typing again to other members every 50s of
return this._super(...arguments);
},
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1582,7 +1582,7 @@ QUnit.test('composer: send button is disabled if attachment upload is not finish
return res;
}
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1648,7 +1648,7 @@ QUnit.test('remove an attachment from composer does not need any confirmation',
id: 20,
});
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1701,7 +1701,7 @@ QUnit.test('remove an uploading attachment', async function (assert) {
return res;
}
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1758,7 +1758,7 @@ QUnit.test('remove an uploading attachment aborts upload', async function (asser
return res;
}
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1797,7 +1797,7 @@ QUnit.test("Show a default status in the recipient status text when the thread d
assert.expect(1);
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].create({
+ const thread = this.messaging.models['Thread'].create({
composer: insertAndReplace({ isLog: false }),
id: 20,
model: 'res.partner',
@@ -1814,7 +1814,7 @@ QUnit.test("Show a thread name in the recipient status text.", async function (a
assert.expect(1);
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].create({
+ const thread = this.messaging.models['Thread'].create({
name: "test name",
composer: insertAndReplace({ isLog: false }),
id: 20,
@@ -1840,7 +1840,7 @@ QUnit.test('send message only once when button send is clicked twice quickly', a
return this._super(...arguments);
},
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1881,7 +1881,7 @@ QUnit.test('[technical] does not crash when an attachment is removed before its
return _super();
},
});
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -1924,7 +1924,7 @@ QUnit.test('send button on mail.channel should have "Send" as label', async func
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
diff --git a/addons/mail/static/src/components/composer_suggested_recipient_list/composer_suggested_recipient_list.js b/addons/mail/static/src/components/composer_suggested_recipient_list/composer_suggested_recipient_list.js
index 8242f08d8ea..5f009332fd1 100644
--- a/addons/mail/static/src/components/composer_suggested_recipient_list/composer_suggested_recipient_list.js
+++ b/addons/mail/static/src/components/composer_suggested_recipient_list/composer_suggested_recipient_list.js
@@ -22,10 +22,10 @@ export class ComposerSuggestedRecipientList extends Component {
//--------------------------------------------------------------------------
/**
- * @returns {mail.thread}
+ * @returns {Thread}
*/
get thread() {
- return this.messaging && this.messaging.models['mail.thread'].get(this.props.threadLocalId);
+ return this.messaging && this.messaging.models['Thread'].get(this.props.threadLocalId);
}
//--------------------------------------------------------------------------
diff --git a/addons/mail/static/src/components/composer_suggestion/composer_suggestion.js b/addons/mail/static/src/components/composer_suggestion/composer_suggestion.js
index 9aac81d3a18..68b663cf58d 100644
--- a/addons/mail/static/src/components/composer_suggestion/composer_suggestion.js
+++ b/addons/mail/static/src/components/composer_suggestion/composer_suggestion.js
@@ -32,7 +32,7 @@ export class ComposerSuggestion extends Component {
}
get isChannel() {
- return this.props.modelName === "mail.thread";
+ return this.props.modelName === "Thread";
}
get isCommand() {
diff --git a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_canned_response_tests.js b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_canned_response_tests.js
index fa7c25c33a7..fb665d82645 100644
--- a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_canned_response_tests.js
+++ b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_canned_response_tests.js
@@ -27,7 +27,7 @@ QUnit.test('canned response suggestion displayed', async function (assert) {
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -54,7 +54,7 @@ QUnit.test('canned response suggestion correct data', async function (assert) {
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -101,7 +101,7 @@ QUnit.test('canned response suggestion active', async function (assert) {
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
diff --git a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_channel_tests.js b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_channel_tests.js
index 751af99b5ff..1f17f95c60e 100644
--- a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_channel_tests.js
+++ b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_channel_tests.js
@@ -27,13 +27,13 @@ QUnit.test('channel mention suggestion displayed', async function (assert) {
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
await createComposerSuggestionComponent(thread.composer, {
isActive: true,
- modelName: 'mail.thread',
+ modelName: 'Thread',
recordLocalId: thread.localId,
});
@@ -52,13 +52,13 @@ QUnit.test('channel mention suggestion correct data', async function (assert) {
name: "General",
});
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
await createComposerSuggestionComponent(thread.composer, {
isActive: true,
- modelName: 'mail.thread',
+ modelName: 'Thread',
recordLocalId: thread.localId,
});
@@ -84,13 +84,13 @@ QUnit.test('channel mention suggestion active', async function (assert) {
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
await createComposerSuggestionComponent(thread.composer, {
isActive: true,
- modelName: 'mail.thread',
+ modelName: 'Thread',
recordLocalId: thread.localId,
});
diff --git a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_command_tests.js b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_command_tests.js
index 8ee88079dba..7c806b3515c 100644
--- a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_command_tests.js
+++ b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_command_tests.js
@@ -27,7 +27,7 @@ QUnit.test('command suggestion displayed', async function (assert) {
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -54,7 +54,7 @@ QUnit.test('command suggestion correct data', async function (assert) {
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -101,7 +101,7 @@ QUnit.test('command suggestion active', async function (assert) {
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
diff --git a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_partner_tests.js b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_partner_tests.js
index 908a4250934..323a85e4842 100644
--- a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_partner_tests.js
+++ b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_partner_tests.js
@@ -27,7 +27,7 @@ QUnit.test('partner mention suggestion displayed', async function (assert) {
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -54,7 +54,7 @@ QUnit.test('partner mention suggestion correct data', async function (assert) {
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -107,7 +107,7 @@ QUnit.test('partner mention suggestion active', async function (assert) {
this.data['mail.channel'].records.push({ id: 20 });
const { createComposerSuggestionComponent } = await this.start();
- const thread = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const thread = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
diff --git a/addons/mail/static/src/components/discuss/tests/discuss_pinned_tests.js b/addons/mail/static/src/components/discuss/tests/discuss_pinned_tests.js
index 180e58a43af..4964d1f033f 100644
--- a/addons/mail/static/src/components/discuss/tests/discuss_pinned_tests.js
+++ b/addons/mail/static/src/components/discuss/tests/discuss_pinned_tests.js
@@ -44,7 +44,7 @@ QUnit.test('sidebar: pinned channel 1: init with one pinned channel', async func
assert.containsOnce(
document.body,
`.o_DiscussSidebarCategoryItem[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId
@@ -61,7 +61,7 @@ QUnit.test('sidebar: pinned channel 2: open pinned channel', async function (ass
this.data['mail.channel'].records.push({ id: 20 });
await this.start();
- const threadGeneral = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const threadGeneral = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -99,7 +99,7 @@ QUnit.test('sidebar: pinned channel 3: open channel and leave it', async functio
},
});
- const threadGeneral = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const threadGeneral = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -137,7 +137,7 @@ QUnit.test('sidebar: unpin channel from bus', async function (assert) {
// with a random unique id that will be referenced in the test
this.data['mail.channel'].records.push({ id: 20 });
await this.start();
- const threadGeneral = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const threadGeneral = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
@@ -205,7 +205,7 @@ QUnit.test('[technical] sidebar: channel group_based_subscription: mandatorily p
is_pinned: false, // expected value for this test
});
await this.start();
- const threadGeneral = this.messaging.models['mail.thread'].findFromIdentifyingData({
+ const threadGeneral = this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
});
diff --git a/addons/mail/static/src/components/discuss/tests/discuss_tests.js b/addons/mail/static/src/components/discuss/tests/discuss_tests.js
index 0f49b6de1d8..c4451b1f0dc 100644
--- a/addons/mail/static/src/components/discuss/tests/discuss_tests.js
+++ b/addons/mail/static/src/components/discuss/tests/discuss_tests.js
@@ -451,7 +451,7 @@ QUnit.test('sidebar: basic channel rendering', async function (assert) {
`);
assert.strictEqual(
channel.dataset.threadLocalId,
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId,
@@ -579,7 +579,7 @@ QUnit.test('sidebar: public/private channel rendering', async function (assert)
document.querySelectorAll(`
.o_DiscussSidebar_categoryChannel
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 100,
model: 'mail.channel',
}).localId
@@ -592,7 +592,7 @@ QUnit.test('sidebar: public/private channel rendering', async function (assert)
document.querySelectorAll(`
.o_DiscussSidebar_categoryChannel
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 101,
model: 'mail.channel'
}).localId
@@ -604,7 +604,7 @@ QUnit.test('sidebar: public/private channel rendering', async function (assert)
const channel1 = document.querySelector(`
.o_DiscussSidebar_categoryChannel
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 100,
model: 'mail.channel'
}).localId
@@ -613,7 +613,7 @@ QUnit.test('sidebar: public/private channel rendering', async function (assert)
const channel2 = document.querySelector(`
.o_DiscussSidebar_categoryChannel
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 101,
model: 'mail.channel'
}).localId
@@ -652,7 +652,7 @@ QUnit.test('sidebar: basic chat rendering', async function (assert) {
const chat = document.querySelector(`.o_DiscussSidebar_categoryChat .o_DiscussSidebarCategory_item`);
assert.strictEqual(
chat.dataset.threadLocalId,
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel'
}).localId,
@@ -770,7 +770,7 @@ QUnit.test('sidebar: chat im_status rendering', async function (assert) {
document.querySelectorAll(`
.o_DiscussSidebar_categoryChat
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -783,7 +783,7 @@ QUnit.test('sidebar: chat im_status rendering', async function (assert) {
document.querySelectorAll(`
.o_DiscussSidebar_categoryChat
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 12,
model: 'mail.channel',
}).localId
@@ -796,7 +796,7 @@ QUnit.test('sidebar: chat im_status rendering', async function (assert) {
document.querySelectorAll(`
.o_DiscussSidebar_categoryChat
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 13,
model: 'mail.channel',
}).localId
@@ -808,7 +808,7 @@ QUnit.test('sidebar: chat im_status rendering', async function (assert) {
const chat1 = document.querySelector(`
.o_DiscussSidebar_categoryChat
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -817,7 +817,7 @@ QUnit.test('sidebar: chat im_status rendering', async function (assert) {
const chat2 = document.querySelector(`
.o_DiscussSidebar_categoryChat
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 12,
model: 'mail.channel',
}).localId
@@ -826,7 +826,7 @@ QUnit.test('sidebar: chat im_status rendering', async function (assert) {
const chat3 = document.querySelector(`
.o_DiscussSidebar_categoryChat
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 13,
model: 'mail.channel',
}).localId
@@ -908,7 +908,7 @@ QUnit.test('default thread rendering', async function (assert) {
assert.strictEqual(
document.querySelectorAll(`
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId
@@ -998,7 +998,7 @@ QUnit.test('default thread rendering', async function (assert) {
await afterNextRender(() =>
document.querySelector(`
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId
@@ -1008,7 +1008,7 @@ QUnit.test('default thread rendering', async function (assert) {
assert.ok(
document.querySelector(`
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId
@@ -1166,7 +1166,7 @@ QUnit.test('open channel from active_id as channel id', async function (assert)
document.body,
`
.o_Discuss_thread[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({ id: 20, model: 'mail.channel' }).localId
+ this.messaging.models['Thread'].findFromIdentifyingData({ id: 20, model: 'mail.channel' }).localId
}"]
`,
"should have channel with ID 20 open in Discuss when providing active_id 20"
@@ -1952,7 +1952,7 @@ QUnit.test('restore thread scroll position', async function (assert) {
document.querySelector(`
.o_DiscussSidebar_categoryChannel
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 12,
model: 'mail.channel',
}).localId
@@ -1985,7 +1985,7 @@ QUnit.test('restore thread scroll position', async function (assert) {
document.querySelector(`
.o_DiscussSidebar_categoryChannel
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 11,
model: 'mail.channel',
}).localId
@@ -2015,7 +2015,7 @@ QUnit.test('restore thread scroll position', async function (assert) {
document.querySelector(`
.o_DiscussSidebar_categoryChannel
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 12,
model: 'mail.channel',
}).localId
@@ -2082,7 +2082,7 @@ QUnit.test('redirect to author (open chat)', async function (assert) {
document.querySelector(`
.o_DiscussSidebar_categoryChannel
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 1,
model: 'mail.channel',
}).localId
@@ -2094,7 +2094,7 @@ QUnit.test('redirect to author (open chat)', async function (assert) {
document.querySelector(`
.o_DiscussSidebar_categoryChat
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -2130,7 +2130,7 @@ QUnit.test('redirect to author (open chat)', async function (assert) {
document.querySelector(`
.o_DiscussSidebar_categoryChannel
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 1,
model: 'mail.channel',
}).localId
@@ -2142,7 +2142,7 @@ QUnit.test('redirect to author (open chat)', async function (assert) {
document.querySelector(`
.o_DiscussSidebar_categoryChat
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -2199,7 +2199,7 @@ QUnit.test('sidebar quick search', async function (assert) {
document.querySelector(`
.o_DiscussSidebar_categoryChannel .o_DiscussSidebarCategory_item
`).dataset.threadLocalId,
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 12,
model: 'mail.channel',
}).localId,
@@ -2269,7 +2269,7 @@ QUnit.test('basic top bar rendering', async function (assert) {
await afterNextRender(() =>
document.querySelector(`
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId
@@ -2340,7 +2340,7 @@ QUnit.test('inbox: mark all messages as read', async function (assert) {
assert.strictEqual(
document.querySelector(`
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId
@@ -2375,7 +2375,7 @@ QUnit.test('inbox: mark all messages as read', async function (assert) {
assert.strictEqual(
document.querySelectorAll(`
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 20,
model: 'mail.channel',
}).localId
@@ -2977,7 +2977,7 @@ QUnit.test('mark channel as seen on last message visible [REQUIRE FOCUS]', async
assert.containsOnce(
document.body,
`.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -2987,7 +2987,7 @@ QUnit.test('mark channel as seen on last message visible [REQUIRE FOCUS]', async
assert.hasClass(
document.querySelector(`
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -3002,7 +3002,7 @@ QUnit.test('mark channel as seen on last message visible [REQUIRE FOCUS]', async
func: () => {
document.querySelector(`
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -3021,7 +3021,7 @@ QUnit.test('mark channel as seen on last message visible [REQUIRE FOCUS]', async
assert.doesNotHaveClass(
document.querySelector(`
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -3954,7 +3954,7 @@ QUnit.test('mark channel as seen if last message is visible when switching chann
func: () => {
document.querySelector(`
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
@@ -3973,7 +3973,7 @@ QUnit.test('mark channel as seen if last message is visible when switching chann
assert.doesNotHaveClass(
document.querySelector(`
.o_DiscussSidebarCategory_item[data-thread-local-id="${
- this.messaging.models['mail.thread'].findFromIdentifyingData({
+ this.messaging.models['Thread'].findFromIdentifyingData({
id: 10,
model: 'mail.channel',
}).localId
diff --git a/addons/mail/static/src/components/discuss_mobile_mailbox_selection/discuss_mobile_mailbox_selection.js b/addons/mail/static/src/components/discuss_mobile_mailbox_selection/discuss_mobile_mailbox_selection.js
index e57a3169995..dfc0af48f1d 100644
--- a/addons/mail/static/src/components/discuss_mobile_mailbox_selection/discuss_mobile_mailbox_selection.js
+++ b/addons/mail/static/src/components/discuss_mobile_mailbox_selection/discuss_mobile_mailbox_selection.js
@@ -11,13 +11,13 @@ export class DiscussMobileMailboxSelection extends Component {
//--------------------------------------------------------------------------
/**
- * @returns {mail.thread[]}
+ * @returns {Thread[]}
*/
get orderedMailboxes() {
if (!this.messaging) {
return [];
}
- return this.messaging.models['mail.thread']
+ return this.messaging.models['Thread']
.all(thread => thread.isPinned && thread.model === 'mail.box')
.sort((mailbox1, mailbox2) => {
if (mailbox1 === this.messaging.inbox) {
@@ -57,7 +57,7 @@ export class DiscussMobileMailboxSelection extends Component {
*/
_onClick(ev) {
const { mailboxLocalId } = ev.currentTarget.dataset;
- const mailbox = this.messaging.models['mail.thread'].get(mailboxLocalId);
+ const mailbox = this.messaging.models['Thread'].get(mailboxLocalId);
if (!mailbox) {
return;
}
diff --git a/addons/mail/static/src/components/discuss_sidebar/discuss_sidebar.xml b/addons/mail/static/src/components/discuss_sidebar/discuss_sidebar.xml
index 612952269e9..ed4b751332c 100644
--- a/addons/mail/static/src/components/discuss_sidebar/discuss_sidebar.xml
+++ b/addons/mail/static/src/components/discuss_sidebar/discuss_sidebar.xml
@@ -15,7 +15,7 @@