[IMP] mail: fix display message attachment error
bzr revid: chm@openerp.com-20121207091134-9v0ce6o3dp8gca7l
This commit is contained in:
parent
94c9801ac7
commit
27bc9ed5fa
|
@ -5124,13 +5124,9 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie
|
|||
// TODO : activate send on wizard and form
|
||||
|
||||
if (result.error || !result.id ) {
|
||||
|
||||
console.log(result.error);
|
||||
this.do_warn(result.error.split('---')[0], result.error.split('---')[1]);
|
||||
this.do_warn( instance.web.qweb.render('message_error_uploading'), result.error);
|
||||
files = _.filter(files, function (val) { return !val.upload; });
|
||||
|
||||
} else {
|
||||
|
||||
for(var i in files){
|
||||
if(files[i].filename == result.filename && files[i].upload) {
|
||||
files[i] = {
|
||||
|
@ -5141,7 +5137,6 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie
|
|||
};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.set({'value': files});
|
||||
|
|
|
@ -1115,20 +1115,12 @@ instance.web.Sidebar = instance.web.Widget.extend({
|
|||
});
|
||||
});
|
||||
},
|
||||
do_attachement_update: function(dataset, model_id,args) {
|
||||
do_attachement_update: function(dataset, model_id, args) {
|
||||
var self = this;
|
||||
this.dataset = dataset;
|
||||
this.model_id = model_id;
|
||||
if (args && args[0]["error"]) {
|
||||
instance.web.dialog($('<div>'),{
|
||||
modal: true,
|
||||
title: "OpenERP " + _.str.capitalize(args[0]["title"]),
|
||||
buttons: [{
|
||||
text: _t("Ok"),
|
||||
click: function(){
|
||||
$(this).dialog("close");
|
||||
}}]
|
||||
}).html(args[0]["error"]);
|
||||
if (args && args[0].error) {
|
||||
this.do_warn( instance.web.qweb.render('message_error_uploading'), args[0].error);
|
||||
}
|
||||
if (!model_id) {
|
||||
this.on_attachments_loaded([]);
|
||||
|
|
|
@ -636,6 +636,8 @@
|
|||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="message_error_uploading">Uploading error</t>
|
||||
|
||||
<t t-name="TreeView">
|
||||
<select t-if="toolbar" style="width: 30%">
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue