diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index c76daac9b06..285534ee96e 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -374,13 +374,6 @@ class MailThread(models.AbstractModel): options = eval(node.get('options', '{}')) is_employee = self.env.user.has_group('base.group_user') options['display_log_button'] = is_employee - if is_employee: - Subtype = self.env['mail.message.subtype'].sudo() - # fetch internal subtypes - internal_subtypes = Subtype.search_read([ - ('res_model', 'in', [False, self._name]), - ('internal', '=', True)], ['name', 'description', 'sequence']) - options['internal_subtypes'] = internal_subtypes # emoji list options['emoji_list'] = self.env['mail.shortcode'].search([('shortcode_type', '=', 'image')]).read(['source', 'description', 'substitution']) # save options on the node diff --git a/addons/mail/static/src/js/chatter.js b/addons/mail/static/src/js/chatter.js index 431119baefd..271c3e9fa51 100644 --- a/addons/mail/static/src/js/chatter.js +++ b/addons/mail/static/src/js/chatter.js @@ -30,7 +30,6 @@ var ChatterComposer = composer.BasicComposer.extend({ display_mode: 'textarea', record_name: false, is_log: false, - internal_subtypes: [], }); if (this.options.is_log) { this.options.send_text = _t('Log'); @@ -56,7 +55,6 @@ var ChatterComposer = composer.BasicComposer.extend({ var def = $.Deferred(); this._super().then(function (message) { message = _.extend(message, { - subtype_id: false, subtype: 'mail.mt_comment', message_type: 'comment', content_subtype: 'html', @@ -65,12 +63,7 @@ var ChatterComposer = composer.BasicComposer.extend({ // Subtype if (self.options.is_log) { - var subtype_id = parseInt(self.$('.o_chatter_composer_subtype_select').val()); - if (_.indexOf(_.pluck(self.options.internal_subtypes, 'id'), subtype_id) === -1) { - message.subtype = 'mail.mt_note'; - } else { - message.subtype_id = subtype_id; - } + message.subtype = 'mail.mt_note'; } // Partner_ids @@ -487,7 +480,6 @@ var Chatter = form_common.AbstractField.extend({ input_min_height: 50, input_max_height: Number.MAX_VALUE, // no max_height limit for the chatter input_baseline: 14, - internal_subtypes: this.options.internal_subtypes, is_log: options && options.is_log, record_name: this.record_name, default_body: old_composer && old_composer.$input.val(), diff --git a/addons/mail/static/src/less/chatter.less b/addons/mail/static/src/less/chatter.less index faa79584067..1ac1df1a65d 100644 --- a/addons/mail/static/src/less/chatter.less +++ b/addons/mail/static/src/less/chatter.less @@ -11,19 +11,6 @@ font-style: italic; } - .o_chatter_composer_subtypes { - > label { - display: inline-block; // Required for old design compatibility - width: 100px; - } - - .o_chatter_composer_subtype_select { - display: inline-block; - min-width: 150px; - width: auto; - } - } - .o_composer { margin-top: 10px; diff --git a/addons/mail/static/src/xml/chatter.xml b/addons/mail/static/src/xml/chatter.xml index 6af37cfa340..22931689bde 100644 --- a/addons/mail/static/src/xml/chatter.xml +++ b/addons/mail/static/src/xml/chatter.xml @@ -13,16 +13,6 @@ Log an internal note which will not be sent to followers, but which can be read by users accessing this document. - -