From deae5239e20f3b953a5c9eaea496d5ba94e9c90b Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Wed, 15 Jan 2025 18:22:37 +0100 Subject: [PATCH] [IMP] mail_send_confirmation: wizard --- mail_send_confirmation/README.rst | 8 ++++---- mail_send_confirmation/__manifest__.py | 4 ++++ mail_send_confirmation/readme/CONTRIBUTORS.md | 2 ++ mail_send_confirmation/readme/DESCRIPTION.md | 11 ++--------- .../static/description/index.html | 11 +++++++---- .../views/mail_compose_message.xml | 17 +++++++++++++++++ 6 files changed, 36 insertions(+), 17 deletions(-) create mode 100644 mail_send_confirmation/views/mail_compose_message.xml diff --git a/mail_send_confirmation/README.rst b/mail_send_confirmation/README.rst index 05eb9c056d..13ca03ecba 100644 --- a/mail_send_confirmation/README.rst +++ b/mail_send_confirmation/README.rst @@ -66,13 +66,13 @@ Authors Contributors ------------ -- `Quartile `__: +- `Quartile `__: - - Aung Ko Ko Lin + - Aung Ko Ko Lin -- `360ERP `__: +- `360ERP `__: - - Andrea Stirpe + - Andrea Stirpe Maintainers ----------- diff --git a/mail_send_confirmation/__manifest__.py b/mail_send_confirmation/__manifest__.py index 393d8e599a..f0fa0b189a 100644 --- a/mail_send_confirmation/__manifest__.py +++ b/mail_send_confirmation/__manifest__.py @@ -1,4 +1,5 @@ # Copyright 2023 Quartile Limited +# Copyright 2025 CorporateHub # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Mail Send Confirmation", @@ -13,5 +14,8 @@ "mail_send_confirmation/static/src/models/composer_view.esm.js", ], }, + "data": [ + "views/mail_compose_message.xml", + ], "installable": True, } diff --git a/mail_send_confirmation/readme/CONTRIBUTORS.md b/mail_send_confirmation/readme/CONTRIBUTORS.md index 683e247345..1f81e0c83a 100644 --- a/mail_send_confirmation/readme/CONTRIBUTORS.md +++ b/mail_send_confirmation/readme/CONTRIBUTORS.md @@ -2,3 +2,5 @@ - Aung Ko Ko Lin - [360ERP](https://www.360erp.com): - Andrea Stirpe +- [CorporateHub](https://corporatehub.eu/) + - Alexey Pelykh \<\> diff --git a/mail_send_confirmation/readme/DESCRIPTION.md b/mail_send_confirmation/readme/DESCRIPTION.md index b4a1c05795..6420ffba2e 100644 --- a/mail_send_confirmation/readme/DESCRIPTION.md +++ b/mail_send_confirmation/readme/DESCRIPTION.md @@ -1,10 +1,3 @@ This module asks for confirmation when 'Send' button in the message -composer of the chatter is pressed, to reduce the chances of -accidentally sending an internal message to the external followers. - -## Limitation - -As of now, this module does not change the behavior of the full composer -(i.e. no confirmation will be requested), which shows the recipients and -therefore the extra confirmation step may not be as necessary as in the -simple composer. +composer is pressed, to reduce the chances of accidentally sending an +internal message to the external followers. diff --git a/mail_send_confirmation/static/description/index.html b/mail_send_confirmation/static/description/index.html index 31804ad90a..d89cb7149c 100644 --- a/mail_send_confirmation/static/description/index.html +++ b/mail_send_confirmation/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -419,7 +420,9 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

diff --git a/mail_send_confirmation/views/mail_compose_message.xml b/mail_send_confirmation/views/mail_compose_message.xml new file mode 100644 index 0000000000..9c9e6d3d7f --- /dev/null +++ b/mail_send_confirmation/views/mail_compose_message.xml @@ -0,0 +1,17 @@ + + + + + mail.compose.message.form + mail.compose.message + + + + This message will be sent to external partners as well. Are you sure you would like to send this message? + + + + +