[IMP] mail: display message attachment error

bzr revid: chm@openerp.com-20121207090941-65b2vgwy066wlsmg
This commit is contained in:
Christophe Matthieu
2012-12-07 10:09:41 +01:00
parent 84ac690b92
commit f8c206b1b8
2 changed files with 6 additions and 3 deletions
+1 -3
View File
@@ -422,9 +422,7 @@ openerp.mail = function (session) {
on_attachment_loaded: function (event, result) {
if (result.erorr || !result.id ) {
var error_title = result.error.split('\n')[0];
var error_content = result.error.replace(/^.*\n/, '');
this.do_warn(error_title, error_content);
this.do_warn( session.web.qweb.render('mail.error_upload'), result.error);
this.attachment_ids = _.filter(this.attachment_ids, function (val) { return !val.upload; });
} else {
for (var i in this.attachment_ids) {
+5
View File
@@ -179,6 +179,11 @@
<div class="oe_view_nocontent">No messages.</div>
</t>
<!--
error message for uploading
-->
<t t-name="mail.error_upload">Uploading error</t>
<!--
record_thread main template
Template used to display the communication history in documents