summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/message/message.js
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-08-24 10:37:47 +0000
committerSébastien Theys <seb@odoo.com>2020-08-24 13:21:45 +0000
commit72b9335334c076d8deaa36e404feaa3f4d30c351 (patch)
treeaea8c816b33d89b409fedbc75bcca3d2d6597717 /addons/mail/static/src/models/message/message.js
parent0834d241624330ab3fd3925366a3217fe8145dfc (diff)
[FIX] mail, im_livechat: make livechat work properly
- fix traceback on receiving first livechat message due to bad computation of correspondent - fix missing [0] in return of country name_get in channel_info - fix visitor/correspondent computation to work when chatting with oneself - reintroduce livechat ordered by last message in discuss sidebar - improve mock server to make these fixes possible to test - introduce corresponding tests PR: #56243 task-2323670 closes odoo/odoo#56414 X-original-commit: f623bfd2c8819604c709bc723153c071dca6e3cc Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/message/message.js')
-rw-r--r--addons/mail/static/src/models/message/message.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/mail/static/src/models/message/message.js b/addons/mail/static/src/models/message/message.js
index 582745e28f2..e982df36667 100644
--- a/addons/mail/static/src/models/message/message.js
+++ b/addons/mail/static/src/models/message/message.js
@@ -607,12 +607,13 @@ function factory(dependencies) {
tracking_value_ids: attr({
default: [],
}),
-
/**
- * All channels that this message is linked to (from server message
- * format).
+ * All channels containing this message on the server.
+ * Equivalent of python field `channel_ids`.
*/
- serverChannels: many2many('mail.thread'),
+ serverChannels: many2many('mail.thread', {
+ inverse: 'messagesAsServerChannel',
+ }),
};
Message.modelName = 'mail.message';