From a1f73dabe70ebd3790d4bfb5543f9eb3950ce747 Mon Sep 17 00:00:00 2001 From: luis Date: Sat, 14 Feb 2026 17:34:18 +0100 Subject: [PATCH] Arbore/arbore#85 add mail_quoted_reply_icon --- mail_quoted_reply_icon/__init__.py | 0 mail_quoted_reply_icon/__manifest__.py | 19 +++++++++++ .../src/models/message_action_view.esm.js | 33 +++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 mail_quoted_reply_icon/__init__.py create mode 100644 mail_quoted_reply_icon/__manifest__.py create mode 100644 mail_quoted_reply_icon/static/src/models/message_action_view.esm.js diff --git a/mail_quoted_reply_icon/__init__.py b/mail_quoted_reply_icon/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mail_quoted_reply_icon/__manifest__.py b/mail_quoted_reply_icon/__manifest__.py new file mode 100644 index 0000000..2feb759 --- /dev/null +++ b/mail_quoted_reply_icon/__manifest__.py @@ -0,0 +1,19 @@ +{ + "name": "Mail Quoted Reply Icon", + "summary": "Changes the icon for quoted reply from fa-reply to fa-envelope", + "version": "16.0.1.0.0", + "category": "Discuss", + "license": "AGPL-3", + "author": "Criptoamrt", + "website": "https://criptomart.net", + "depends": ["mail_quoted_reply"], + "data": [], + "demo": [], + "installable": True, + "application": False, + "assets": { + "web.assets_backend": [ + "/mail_quoted_reply_icon/static/src/models/*.js", + ], + }, +} diff --git a/mail_quoted_reply_icon/static/src/models/message_action_view.esm.js b/mail_quoted_reply_icon/static/src/models/message_action_view.esm.js new file mode 100644 index 0000000..cf8ee56 --- /dev/null +++ b/mail_quoted_reply_icon/static/src/models/message_action_view.esm.js @@ -0,0 +1,33 @@ +/** @odoo-module **/ + +import {registerPatch} from "@mail/model/model_core"; + +registerPatch({ + name: "MessageActionView", + fields: { + classNames: { + compute() { + let classNames = this._super() || ""; + if ( + this.messageAction.messageActionListOwner === + this.messageAction.replyMessageAction + ) { + // Replace the fa-reply icon added by mail_quoted_reply with fa-envelope + classNames = classNames.replace("fa-reply", "fa-envelope"); + } + return classNames; + }, + }, + title: { + compute() { + if ( + this.messageAction.messageActionListOwner === + this.messageAction.replyMessageAction + ) { + return this.env._t("Reply by Email"); + } + return this._super(); + }, + }, + }, +});