[FIX] mail : close #2250. If trying to send empty message in chatter, no other messages can be send wihtout refreshing page. Moving the flag_post allow sending a new message only when the previous one is sucessufully sent. If case of empty message, nothing will happen, and the chatter will not be blocked.

This commit is contained in:
Jérome Maes 2014-12-30 11:24:55 +01:00
parent 6372313494
commit 1adb3de371
1 changed files with 1 additions and 1 deletions

View File

@ -700,8 +700,8 @@ openerp.mail = function (session) {
if (self.flag_post) {
return;
}
self.flag_post = true;
if (this.do_check_attachment_upload() && (this.attachment_ids.length || this.$('textarea').val().match(/\S+/))) {
self.flag_post = true;
if (this.is_log) {
this.do_send_message_post([], this.is_log);
}