[FIX] mail,mail_tip: trigger event when chatter is ready

The code in mail_tip included former implementation of the timeline view, which
is now replaced by slack.
This commit is contained in:
Aaron Bohy
2015-09-01 20:58:08 +02:00
parent 823ece2437
commit 915c5d2053
2 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -349,7 +349,7 @@ var ChatterMailThread = form_common.AbstractField.extend(mail_thread.MailThreadM
'default_model': this.view.model || false,
}, this.options.context || {});
// fetch messages of current document
this.message_format(this.get_value().slice(0, mail_thread.LIMIT_MESSAGE)).then(function(raw_messages){
return this.message_format(this.get_value().slice(0, mail_thread.LIMIT_MESSAGE)).then(function(raw_messages){
self._message_replace(self._message_preprocess(raw_messages));
self.record_name = _.last(raw_messages) ? _.last(raw_messages).record_name : '';
// set the thread as read
+5 -6
View File
@@ -1,15 +1,14 @@
odoo.define('mail_tip.mail_tip', function (require) {
"use strict";
var mail = require('mail.mail');
var core = require('web.core');
var mail = require('mail.chatter');
mail.MailThread.include({
message_fetch: function() {
mail.ChatterMailThread.include({
render_value: function() {
var self = this;
return this._super.apply(this, arguments).done(function() {
this._super.apply(this, arguments).done(function() {
// event has to be triggered on form view
self.parent_view.trigger('chatter_messages_displayed');
self.view.trigger('chatter_messages_displayed');
});
}
});