|
@ -1,4 +1,4 @@ |
|
|
odoo.define('mail_archives.archives', function (require) { |
|
|
|
|
|
|
|
|
odoo.define('mail_sent.sent', function (require) { |
|
|
"use strict"; |
|
|
"use strict"; |
|
|
|
|
|
|
|
|
var base_obj = require('mail_base.base'); |
|
|
var base_obj = require('mail_base.base'); |
|
@ -20,7 +20,7 @@ var _t = core._t; |
|
|
base_obj.MailTools.include({ |
|
|
base_obj.MailTools.include({ |
|
|
get_properties: function(msg){ |
|
|
get_properties: function(msg){ |
|
|
var properties = this._super.apply(this, arguments); |
|
|
var properties = this._super.apply(this, arguments); |
|
|
properties.is_archive = this.property_descr("channel_archive", msg, this); |
|
|
|
|
|
|
|
|
properties.is_archive = this.property_descr("channel_sent", msg, this); |
|
|
return properties; |
|
|
return properties; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -32,19 +32,19 @@ base_obj.MailTools.include({ |
|
|
|
|
|
|
|
|
get_channel_array: function(msg){ |
|
|
get_channel_array: function(msg){ |
|
|
var arr = this._super.apply(this, arguments); |
|
|
var arr = this._super.apply(this, arguments); |
|
|
return arr.concat('channel_archive'); |
|
|
|
|
|
|
|
|
return arr.concat('channel_sent'); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
get_domain: function(channel){ |
|
|
get_domain: function(channel){ |
|
|
return (channel.id === "channel_archive") ? [] : this._super.apply(this, arguments); |
|
|
|
|
|
|
|
|
return (channel.id === "channel_sent") ? [] : this._super.apply(this, arguments); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
base_obj.chat_manager.is_ready.then(function(){ |
|
|
base_obj.chat_manager.is_ready.then(function(){ |
|
|
// Add archive channel
|
|
|
// Add archive channel
|
|
|
base_obj.chat_manager.mail_tools.add_channel({ |
|
|
base_obj.chat_manager.mail_tools.add_channel({ |
|
|
id: "channel_archive", |
|
|
|
|
|
name: _t("Archive"), |
|
|
|
|
|
|
|
|
id: "channel_sent", |
|
|
|
|
|
name: _t("Sent"), |
|
|
type: "static" |
|
|
type: "static" |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|