From 94a90311edd7bb21d44dac9f6b0432a18e3590eb Mon Sep 17 00:00:00 2001 From: Mitchell Admin Date: Wed, 14 Jul 2021 16:23:33 +0000 Subject: [PATCH 1/2] :arrow_up::one::three: OCA/odoo-module-migrator close #346 > Made via .github/workflows/DINAR-PORT.yml --- mail_archives/__manifest__.py | 2 +- mail_archives/views/templates.xml | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) 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/views/templates.xml b/mail_archives/views/templates.xml index f8c63648a..cea7d5cb4 100644 --- a/mail_archives/views/templates.xml +++ b/mail_archives/views/templates.xml @@ -1,6 +1,5 @@ - - + - - + From 369b98765b5db58e07c017e858a4b8d0e5b16cb9 Mon Sep 17 00:00:00 2001 From: Mitchell Admin Date: Wed, 14 Jul 2021 16:24:45 +0000 Subject: [PATCH 2/2] :rainbow: pre-commit > Made via .github/workflows/DINAR-PORT.yml --- mail_archives/static/src/js/archives.js | 16 +++++++------- mail_archives/static/src/xml/menu.xml | 7 +++--- mail_archives/views/templates.xml | 29 +++++++++++-------------- 3 files changed, 25 insertions(+), 27 deletions(-) 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 cea7d5cb4..51f02b321 100644 --- a/mail_archives/views/templates.xml +++ b/mail_archives/views/templates.xml @@ -1,19 +1,16 @@ -