From a7489feed09c9fe69e2712bfe17b4f45933c71b4 Mon Sep 17 00:00:00 2001 From: ryv-odoo Date: Tue, 1 Oct 2019 10:58:39 +0000 Subject: [PATCH] [FIX] mass_mailing: mail template become invisible after saving MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug === In the mailing mailing form view, after saving the email and creating it, the body is invisible and one needs to edit and save again to see the content The view has two fields with the same name Fix === At the end, we have only one field and some condition on the attributes (class, widget) TASK_ID : 2078918 Co-authored-by: Stéphane Debauche --- .../static/src/js/mass_mailing_widget.js | 7 +++++++ .../views/mailing_mailing_views.xml | 21 +++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/addons/mass_mailing/static/src/js/mass_mailing_widget.js b/addons/mass_mailing/static/src/js/mass_mailing_widget.js index d0c16fa4a36..acd2c6dacc1 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_widget.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_widget.js @@ -137,6 +137,13 @@ var MassMailingFieldHtml = FieldHtml.extend({ } return this._super.apply(this, arguments); }, + /** + * @override + */ + _renderReadonly: function () { + this.value = this.recordData[this.nodeOptions['inline-field']]; + return this._super.apply(this, arguments); + }, /** * @override diff --git a/addons/mass_mailing/views/mailing_mailing_views.xml b/addons/mass_mailing/views/mailing_mailing_views.xml index f1d9bd8e630..7d26cce71be 100644 --- a/addons/mass_mailing/views/mailing_mailing_views.xml +++ b/addons/mass_mailing/views/mailing_mailing_views.xml @@ -168,19 +168,14 @@ -
- - -
-
- -
+ +