diff --git a/addons/mail/i18n/mail.pot b/addons/mail/i18n/mail.pot index 23496dbba76..06feeebb361 100644 --- a/addons/mail/i18n/mail.pot +++ b/addons/mail/i18n/mail.pot @@ -6113,6 +6113,13 @@ msgstr "" msgid "You are in channel #%s." msgstr "" +#. module: mail +#. openerp-web +#: code:addons/mail/static/src/js/attachment_box.js:0 +#, python-format +msgid "You are not allowed to upload an attachment here." +msgstr "" + #. module: mail #. openerp-web #: code:addons/mail/static/src/js/discuss.js:0 diff --git a/addons/mail/static/src/js/attachment_box.js b/addons/mail/static/src/js/attachment_box.js index 17e91b410e9..f0bf5801108 100644 --- a/addons/mail/static/src/js/attachment_box.js +++ b/addons/mail/static/src/js/attachment_box.js @@ -127,8 +127,12 @@ var AttachmentBox = Widget.extend({ /** * @private */ - _onUploaded: function() { - this.trigger_up('reload_attachment_box'); + _onUploaded: function(ev, response) { + if (response.error) { + this.do_warn(_t("Error"), _t("You are not allowed to upload an attachment here.")); + } else { + this.trigger_up('reload_attachment_box'); + } }, });