diff --git a/web_send_message_popup/__manifest__.py b/web_send_message_popup/__manifest__.py index 8b86505b4..2c93fa35a 100644 --- a/web_send_message_popup/__manifest__.py +++ b/web_send_message_popup/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (http://gnu.org/licenses/agpl). { "name": "Web Send Message as Popup", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "author": "Camptocamp, Odoo Community Association (OCA)", "maintainer": "Camptocamp", "license": "AGPL-3", diff --git a/web_send_message_popup/readme/CONTRIBUTORS.rst b/web_send_message_popup/readme/CONTRIBUTORS.rst index f031b4d70..8c768804a 100644 --- a/web_send_message_popup/readme/CONTRIBUTORS.rst +++ b/web_send_message_popup/readme/CONTRIBUTORS.rst @@ -3,3 +3,4 @@ * Nicolas JEUDY * Artem Kostyuk * Stéphane Mangin +* Helly kapatel diff --git a/web_send_message_popup/static/src/js/chatter.js b/web_send_message_popup/static/src/js/chatter.js index b22de92ae..f9cd4f5b0 100644 --- a/web_send_message_popup/static/src/js/chatter.js +++ b/web_send_message_popup/static/src/js/chatter.js @@ -1,17 +1,27 @@ /* Copyright 2019-2021 Camptocamp SA * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ -odoo.define("web_send_message_popup.Chatter", function (require) { +odoo.define("web_send_message_popup/static/src/js/chatter.js", function (require) { "use strict"; - var Chatter = require("mail.Chatter"); + const components = { + Composer: require("mail/static/src/components/chatter_topbar/chatter_topbar.js"), + }; + const {patch} = require("web.utils"); - Chatter.include({ - _onOpenComposerMessage: function () { + patch(components.Composer, "web_send_message_popup/static/src/js/chatter.js", { + /** + * Overwrite to always launch full composer instead of quick messages + */ + _onClickSendMessage() { this._super.apply(this, arguments); - var self = this; - this._suggestedPartnersProm.then(function () { - self._composer._onOpenFullComposer(); - }); + if ( + this.chatter.composer && + this.chatter.isComposerVisible && + !this.chatter.composer.isLog + ) { + this.chatter.update({isComposerVisible: false}); + this.chatter.composer.openFullComposer(); + } }, }); });