[MERGE] [FIX] Chatter:

- message date was wrong for records created from incoming email servers.
- fix the (only visual) duplication of partners in the 'To' of quick reply widget
- fixed empty list message appearing twice when quickly clicking on 'read'

bzr revid: tde@openerp.com-20130329105116-7ocxb9cn9f1h7yi6
This commit is contained in:
Thibault Delavallée
2013-03-29 11:51:16 +01:00
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -809,7 +809,7 @@ class mail_thread(osv.AbstractModel):
# as RFC2822 requires timezone offset in Date headers.
stored_date = parsed_date.replace(tzinfo=pytz.utc)
else:
stored_date = parsed_date.astimezone(pytz.utc)
stored_date = parsed_date.astimezone(tzinfo=pytz.utc)
except Exception:
_logger.warning('Failed to parse Date header %r in incoming mail '
'with message-id %r, assuming current date/time.',
+5 -2
View File
@@ -1208,7 +1208,7 @@ openerp.mail = function (session) {
this.author_id = datasets.author_id || false;
this.thread_level = (datasets.thread_level+1) || 0;
datasets.partner_ids = datasets.partner_ids || [];
if (datasets.author_id && ! _.contains(datasets.partner_ids, datasets.author_id) && datasets.author_id[0]) {
if (datasets.author_id && !_.contains(_.flatten(datasets.partner_ids),datasets.author_id[0]) && datasets.author_id[0]) {
datasets.partner_ids.push(datasets.author_id);
}
this.partner_ids = datasets.partner_ids;
@@ -1389,7 +1389,10 @@ openerp.mail = function (session) {
if (this.options.help) {
no_message.html(this.options.help);
}
no_message.appendTo(this.$el);
if (!this.$el.find(".oe_view_nocontent").length)
{
no_message.appendTo(this.$el);
}
},
/**