diff --git a/mail_activity_board/__manifest__.py b/mail_activity_board/__manifest__.py index 8ef26e0e9..84789c117 100644 --- a/mail_activity_board/__manifest__.py +++ b/mail_activity_board/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Mail Activity Board", "summary": "Add Activity Boards", - "version": "16.0.1.1.1", + "version": "17.0.1.0.0", "development_status": "Beta", "category": "Social Network", "website": "https://github.com/OCA/social", @@ -15,8 +15,8 @@ "data": ["security/groups.xml", "views/mail_activity_view.xml"], "assets": { "web.assets_backend": [ - "mail_activity_board/static/src/components/chatter_topbar/chatter_topbar.esm.js", - "mail_activity_board/static/src/components/chatter_topbar/chatter_topbar.xml", + "mail_activity_board/static/src/components/chatter/chatter.esm.js", + "mail_activity_board/static/src/components/chatter/chatter.xml", ], }, } diff --git a/mail_activity_board/static/description/index.html b/mail_activity_board/static/description/index.html index c1f353c57..b9b5b2b3e 100644 --- a/mail_activity_board/static/description/index.html +++ b/mail_activity_board/static/description/index.html @@ -1,4 +1,3 @@ -
diff --git a/mail_activity_board/static/src/components/chatter/chatter.esm.js b/mail_activity_board/static/src/components/chatter/chatter.esm.js new file mode 100644 index 000000000..cf1514023 --- /dev/null +++ b/mail_activity_board/static/src/components/chatter/chatter.esm.js @@ -0,0 +1,35 @@ +/** @odoo-module **/ +import {Chatter} from "@mail/core/web/chatter"; +import {patch} from "@web/core/utils/patch"; + +patch(Chatter.prototype, { + // -------------------------------------------------------------------------- + // Handlers + // -------------------------------------------------------------------------- + + /** + * @private + * @param {MouseEvent} ev + */ + // eslint-disable-next-line no-unused-vars + async _onListActivity(ev) { + if (this.state.thread) { + const thread = this.state.thread; + const action = await this.orm.call( + thread.model, + "redirect_to_activities", + [[]], + { + id: this.state.thread.id, + model: this.state.thread.model, + } + ); + this.action.doAction(action, { + onClose: () => { + thread.refreshActivities(); + thread.refresh(); + }, + }); + } + }, +}); diff --git a/mail_activity_board/static/src/components/chatter_topbar/chatter_topbar.xml b/mail_activity_board/static/src/components/chatter/chatter.xml similarity index 62% rename from mail_activity_board/static/src/components/chatter_topbar/chatter_topbar.xml rename to mail_activity_board/static/src/components/chatter/chatter.xml index 4f176c480..7aaf27eb1 100644 --- a/mail_activity_board/static/src/components/chatter_topbar/chatter_topbar.xml +++ b/mail_activity_board/static/src/components/chatter/chatter.xml @@ -1,20 +1,19 @@