diff --git a/mail_archives/__manifest__.py b/mail_archives/__manifest__.py
index d51a72412..5197804b5 100644
--- a/mail_archives/__manifest__.py
+++ b/mail_archives/__manifest__.py
@@ -13,5 +13,5 @@
"depends": ["mail"],
"data": ["views/templates.xml"],
"qweb": ["static/src/xml/menu.xml"],
- "installable": False,
+ "installable": True,
}
diff --git a/mail_archives/static/src/js/archives.js b/mail_archives/static/src/js/archives.js
index cc2725a1d..153b86a1f 100644
--- a/mail_archives/static/src/js/archives.js
+++ b/mail_archives/static/src/js/archives.js
@@ -1,4 +1,4 @@
-odoo.define("mail_archives.archives", function(require) {
+odoo.define("mail_archives.archives", function (require) {
"use strict";
var core = require("web.core");
@@ -10,10 +10,10 @@ odoo.define("mail_archives.archives", function(require) {
var _t = core._t;
Manager.include({
- _updateMailboxesFromServer: function(data) {
+ _updateMailboxesFromServer: function (data) {
this._super(data);
if (
- !_.find(this.getThreads(), function(th) {
+ !_.find(this.getThreads(), function (th) {
return th.getID() === "mailbox_channel_archive";
})
) {
@@ -27,7 +27,7 @@ odoo.define("mail_archives.archives", function(require) {
});
SearchableThread.include({
- _fetchMessages: function(pDomain, loadMore) {
+ _fetchMessages: function (pDomain, loadMore) {
var self = this;
if (this._id !== "mailbox_channel_archive") {
return this._super(pDomain, loadMore);
@@ -48,16 +48,16 @@ odoo.define("mail_archives.archives", function(require) {
method: "message_fetch",
args: [domain],
kwargs: this._getFetchMessagesKwargs(),
- }).then(function(messages) {
+ }).then(function (messages) {
// Except this function. It adds the required thread to downloaded messages
- _.each(messages, function(m) {
+ _.each(messages, function (m) {
m.channel_ids.push("mailbox_channel_archive");
});
if (!cache.allHistoryLoaded) {
cache.allHistoryLoaded = messages.length < self._FETCH_LIMIT;
}
cache.loaded = true;
- _.each(messages, function(message) {
+ _.each(messages, function (message) {
self.call("mail_service", "addMessage", message, {
silent: true,
domain: pDomain,
@@ -70,7 +70,7 @@ odoo.define("mail_archives.archives", function(require) {
});
Mailbox.include({
- _getThreadDomain: function() {
+ _getThreadDomain: function () {
if (this._id === "mailbox_channel_archive") {
return [
"|",
diff --git a/mail_archives/static/src/xml/menu.xml b/mail_archives/static/src/xml/menu.xml
index bccfed290..e932755ac 100644
--- a/mail_archives/static/src/xml/menu.xml
+++ b/mail_archives/static/src/xml/menu.xml
@@ -7,9 +7,10 @@
t-attf-class="o_mail_discuss_title_main o_mail_discuss_item #{(activeThreadID == 'channel_archive') ? 'o_active': ''}"
data-thread-id="mailbox_channel_archive"
>
- Archive
+
+
+ Archive
+
diff --git a/mail_archives/views/templates.xml b/mail_archives/views/templates.xml
index f8c63648a..51f02b321 100644
--- a/mail_archives/views/templates.xml
+++ b/mail_archives/views/templates.xml
@@ -1,21 +1,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+