diff --git a/addons/mail/i18n/en_GB.po b/addons/mail/i18n/en_GB.po index 795b679cf09..93711113205 100644 --- a/addons/mail/i18n/en_GB.po +++ b/addons/mail/i18n/en_GB.po @@ -5656,3 +5656,9 @@ msgstr "" #, python-format msgid "unknown target model %s" msgstr "" + +#. module: mail +#: code:addons/mail/models/mail_thread.py:1892 +#, python-format +msgid "Only messages type comment can have their content updated" +msgstr "" diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index 7d2c9a5f17b..37dffb764ea 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -459,6 +459,8 @@ class MailThread(models.AbstractModel): raise exceptions.UserError(_("Only logged notes can have their content updated on model '%s'", self._name)) if message.tracking_value_ids: raise exceptions.UserError(_("Messages with tracking values cannot be modified")) + if not message.message_type == 'comment': + raise exceptions.UserError(_("Only messages type comment can have their content updated")) # ------------------------------------------------------ # TRACKING / LOG