diff options
| author | Sébastien Theys <seb@odoo.com> | 2020-11-16 12:36:47 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-11-16 12:36:47 +0000 |
| commit | 2002c6a599a685f4a18fc670a9f7992c8d595c0f (patch) | |
| tree | e4d273d6cd86496d68e9ebd02c3849d9f52d95d1 /addons/mail/static/tests | |
| parent | 8b32e558fde3cb3aaa1deb40acb07488d04d343e (diff) | |
[FIX] mail: fix race conditions, especially with scroll
The `_update` of some components must take place before the `_update`
of other (usually sibling) components that might directly influence their
layout. This is in particular the case for `_update` that are relying on height.
Prevent force save of scroll position if there are pending hints to adjust it,
and prevent pending hints from overriding new scroll value.
Prevent flicker with message date.
This should fix all known issues related to incorrectly saving or restoring
scroll position.
task-2344226
task-2358066
task-2369332
task-2372339
task-2373741
closes odoo/odoo#61054
Related: odoo/enterprise#14736
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/tests')
| -rw-r--r-- | addons/mail/static/tests/helpers/mock_models.js | 1 | ||||
| -rw-r--r-- | addons/mail/static/tests/helpers/mock_server.js | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/addons/mail/static/tests/helpers/mock_models.js b/addons/mail/static/tests/helpers/mock_models.js index d9101cf1f71..c2617b6108e 100644 --- a/addons/mail/static/tests/helpers/mock_models.js +++ b/addons/mail/static/tests/helpers/mock_models.js @@ -236,6 +236,7 @@ class MockModels { }, 'res.fake': { fields: { + activity_ids: { string: "Activities", type: 'one2many', relation: 'mail.activity' }, email_cc: { type: 'char' }, partner_ids: { string: "Related partners", diff --git a/addons/mail/static/tests/helpers/mock_server.js b/addons/mail/static/tests/helpers/mock_server.js index 9f39f0eb9f1..e78ce39fd31 100644 --- a/addons/mail/static/tests/helpers/mock_server.js +++ b/addons/mail/static/tests/helpers/mock_server.js @@ -872,7 +872,7 @@ MockServer.include({ const members = channel.members.map(memberId => this._getRecords('res.partner', [['id', '=', memberId]])[0].name); let message = "You are alone in this channel."; if (members.length > 0) { - message = `Users in this channel: ${members.join(', ')} and you` + message = `Users in this channel: ${members.join(', ')} and you`; } const notification = [ ["dbName", 'res.partner', this.currentPartnerId], @@ -987,7 +987,7 @@ MockServer.include({ this._mockWrite('mail.channel', [ [channel.id], { message_unread_counter: (channel.message_unread_counter || 0) + 1 }, - ]) + ]); } return messageId; }, |
