summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components
diff options
context:
space:
mode:
authorDidier (did) <did@odoo.com>2020-09-21 13:15:30 +0000
committerDidier (did) <did@odoo.com>2020-09-22 14:50:33 +0000
commit1b329dab9bc5fe3c2d612081ea4c8b5f63b92463 (patch)
tree059474802b1933cae24c2444931ccc006d8a253b /addons/mail/static/src/components
parent1d74680fe195a2ece367ad7251f4cc3a52dc132f (diff)
[FIX] mail: do not show "load more" on temporary thread
task-2341690 closes odoo/odoo#58246 X-original-commit: 9b56c82d3a4b07730490816a67911cbf60900158 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components')
-rw-r--r--addons/mail/static/src/components/chatter/chatter_tests.js7
-rw-r--r--addons/mail/static/src/components/message_list/message_list.xml2
2 files changed, 7 insertions, 2 deletions
diff --git a/addons/mail/static/src/components/chatter/chatter_tests.js b/addons/mail/static/src/components/chatter/chatter_tests.js
index 348291c14cd..95abab26f43 100644
--- a/addons/mail/static/src/components/chatter/chatter_tests.js
+++ b/addons/mail/static/src/components/chatter/chatter_tests.js
@@ -93,7 +93,7 @@ QUnit.test('base rendering when chatter has no attachment', async function (asse
});
QUnit.test('base rendering when chatter has no record', async function (assert) {
- assert.expect(7);
+ assert.expect(8);
await this.start();
const chatter = this.env.models['mail.chatter'].create({
@@ -134,6 +134,11 @@ QUnit.test('base rendering when chatter has no record', async function (assert)
"Creating a new record...",
"should have the 'Creating a new record ...' message"
);
+ assert.containsNone(
+ document.body,
+ '.o_MessageList_loadMore',
+ "should not have the 'load more' button"
+ );
});
QUnit.test('base rendering when chatter has attachments', async function (assert) {
diff --git a/addons/mail/static/src/components/message_list/message_list.xml b/addons/mail/static/src/components/message_list/message_list.xml
index abc83a41f0d..bff87fba3d2 100644
--- a/addons/mail/static/src/components/message_list/message_list.xml
+++ b/addons/mail/static/src/components/message_list/message_list.xml
@@ -96,7 +96,7 @@
Loading...
</div>
</t>
- <t t-elif="!threadView.threadCache.isAllHistoryLoaded">
+ <t t-elif="!threadView.threadCache.isAllHistoryLoaded and !threadView.thread.isTemporary">
<a class="o_MessageList_item o_MessageList_loadMore" href="#" t-on-click="_onClickLoadMore" t-ref="loadMore">
Load more
</a>