From ddf0ea4d1e93558d11b422d7cd6fef4da9212148 Mon Sep 17 00:00:00 2001 From: "Atchuthan, Sodexis" Date: Fri, 22 Jan 2021 13:19:08 +0530 Subject: [PATCH] [IMP] : black, isort, prettier --- .../static/src/js/override_chatter.js | 14 +- .../static/src/xml/inherit_chatter.xml | 13 +- .../tests/test_mail_activity_board.py | 14 +- .../views/mail_activity_view.xml | 231 ++++++++++++------ mail_activity_board/views/templates.xml | 13 +- 5 files changed, 187 insertions(+), 98 deletions(-) diff --git a/mail_activity_board/static/src/js/override_chatter.js b/mail_activity_board/static/src/js/override_chatter.js index d3be65a..19d497c 100644 --- a/mail_activity_board/static/src/js/override_chatter.js +++ b/mail_activity_board/static/src/js/override_chatter.js @@ -1,14 +1,13 @@ /* Copyright 2018 David Juaneda * License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */ -odoo.define('mail.Chatter.activity', function (require) { +odoo.define("mail.Chatter.activity", function (require) { "use strict"; - var chatter = require('mail.Chatter'); + var chatter = require("mail.Chatter"); chatter.include({ - events: _.extend({}, chatter.prototype.events, { - 'click .o_chatter_button_list_activity': '_onListActivity', + "click .o_chatter_button_list_activity": "_onListActivity", }), /** @@ -19,15 +18,14 @@ odoo.define('mail.Chatter.activity', function (require) { _onListActivity: function () { this._rpc({ model: this.record.model, - method: 'redirect_to_activities', + method: "redirect_to_activities", args: [[]], kwargs: { - 'id':this.record.res_id, - 'model':this.record.model, + id: this.record.res_id, + model: this.record.model, }, context: this.record.getContext(), }).then($.proxy(this, "do_action")); }, - }); }); diff --git a/mail_activity_board/static/src/xml/inherit_chatter.xml b/mail_activity_board/static/src/xml/inherit_chatter.xml index 1cc45f0..2a0ab8e 100644 --- a/mail_activity_board/static/src/xml/inherit_chatter.xml +++ b/mail_activity_board/static/src/xml/inherit_chatter.xml @@ -1,11 +1,16 @@ - + - diff --git a/mail_activity_board/tests/test_mail_activity_board.py b/mail_activity_board/tests/test_mail_activity_board.py index 1b02568..7929503 100644 --- a/mail_activity_board/tests/test_mail_activity_board.py +++ b/mail_activity_board/tests/test_mail_activity_board.py @@ -138,10 +138,10 @@ class TestMailActivityBoardMethods(TransactionCase): return result.get("fields_views").get(action.get("view_mode")) def test_open_origin_res_partner(self): - """ This test case checks - - If the method redirects to the form view of the correct one - of an object of the 'res.partner' class to which the activity - belongs. + """This test case checks + - If the method redirects to the form view of the correct one + of an object of the 'res.partner' class to which the activity + belongs. """ # Id of the form view for the class 'crm.lead', type 'lead' form_view_partner_id = self.env.ref("base.view_partner_form").id @@ -165,9 +165,9 @@ class TestMailActivityBoardMethods(TransactionCase): self.assertEqual(form_view_partner_id, view.get("view_id")) def test_redirect_to_activities(self): - """ This test case checks - - if the method returns the correct action, - - if the correct activities are shown. + """This test case checks + - if the method returns the correct action, + - if the correct activities are shown. """ action_id = self.env.ref("mail_activity_board.open_boards_activities").id action = self.partner_client.redirect_to_activities( diff --git a/mail_activity_board/views/mail_activity_view.xml b/mail_activity_board/views/mail_activity_view.xml index 14cbf8c..9576a0e 100644 --- a/mail_activity_board/views/mail_activity_view.xml +++ b/mail_activity_board/views/mail_activity_view.xml @@ -12,38 +12,57 @@
- - - - + + + - - - - + + + + - - - - + + + + - - + + - - + +
@@ -55,13 +74,19 @@ mail.activity.boards.view.tree mail.activity - + - - (date_deadline < current_date) - (date_deadline == current_date) - (date_deadline > current_date) + + (date_deadline < current_date) + (date_deadline == current_date) + (date_deadline > current_date) @@ -72,66 +97,103 @@ mail.activity.boards.view.kanban mail.activity - + - - - - - - - - - - - + + + + + + + + + + +
- - + +
- +
- + - - + + - + - + - - + + - + - +
- +
@@ -147,28 +209,42 @@ mail.activity.boards.view.search mail.activity - - + + primary - - + + - - - + + + - - + + @@ -184,15 +260,17 @@ kanban,form [] {} - - + (0, 0, {'view_mode': 'graph'})]" + /> + @@ -200,10 +278,11 @@ Menus --> + id="board_menu_activities" + name="Activities" + parent="base.menu_board_root" + action="open_boards_activities" + sequence="1" + /> diff --git a/mail_activity_board/views/templates.xml b/mail_activity_board/views/templates.xml index 54182ed..c042c21 100644 --- a/mail_activity_board/views/templates.xml +++ b/mail_activity_board/views/templates.xml @@ -1,8 +1,15 @@ - + -