diff options
| author | Thibault Delavallée <tde@odoo.com> | 2019-10-24 11:09:01 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-12-02 15:18:44 +0000 |
| commit | e2b33f460d0f2359e65107f8615c7e827350b4e7 (patch) | |
| tree | aacc4e64a6253dc57f3369ba5e2cc67312dfe2ea /addons/mail/static/src/js/models | |
| parent | 06f169a0ee0f7508f861c47ee2f39467df7b6dc1 (diff) | |
[REF] mail, various: rename subtype parameter of message_post to subtype_xmlid
PURPOSE
Clean posting process and improve mail.message definition and comprehension.
SPECIFICATIONS
In order to be more explicit subtype parameter is renamed to subtype_xmlid.
It therefore clearly indicates it should be a valid subtype Xml ID. Support
of ill formatted Xml IDs is removed because there is no reason to try to
add some random prefix. Give something that exists or go to hell, punk !
LINKS
Task ID 2071556
PR #38692
Diffstat (limited to 'addons/mail/static/src/js/models')
| -rw-r--r-- | addons/mail/static/src/js/models/threads/channel.js | 2 | ||||
| -rw-r--r-- | addons/mail/static/src/js/models/threads/document_thread.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/static/src/js/models/threads/channel.js b/addons/mail/static/src/js/models/threads/channel.js index 6301018c01f..a47598e3147 100644 --- a/addons/mail/static/src/js/models/threads/channel.js +++ b/addons/mail/static/src/js/models/threads/channel.js @@ -443,7 +443,7 @@ var Channel = SearchableThread.extend(ThreadTypingMixin, { return this._super.apply(this, arguments).then(function (messageData) { _.extend(messageData, { message_type: 'comment', - subtype: 'mail.mt_comment', + subtype_xmlid: 'mail.mt_comment', command: data.command, }); return self._rpc({ diff --git a/addons/mail/static/src/js/models/threads/document_thread.js b/addons/mail/static/src/js/models/threads/document_thread.js index cb860b70beb..eefc8f9bd79 100644 --- a/addons/mail/static/src/js/models/threads/document_thread.js +++ b/addons/mail/static/src/js/models/threads/document_thread.js @@ -331,7 +331,7 @@ var DocumentThread = Thread.extend({ _.extend(messageData, { context: data.context, message_type: data.message_type, - subtype: data.subtype || "mail.mt_comment", + subtype_xmlid: data.subtype_xmlid || "mail.mt_comment", subtype_id: data.subtype_id, }); return self._rpc({ |
