From 82bf20a7007812b6223d946e1de2c8dbfb1e29a7 Mon Sep 17 00:00:00 2001 From: Elisabeth Dickinson Date: Mon, 31 Jan 2022 12:55:09 +0000 Subject: [PATCH] [IMP] mass_mailing: add extra data to `themeParams` for custom styling By adding the `style` attribute to the `.o_layout` element it can be customized according to the data collected with `themeParams`, making it possible to add a custom background color in our template design, for example. See b7537e1d66b4ca26e12f4be16eb1c30632ecee61 closes odoo/odoo#83701 Signed-off-by: Antoine Guenet --- addons/mass_mailing/static/src/js/mass_mailing_widget.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 6c8da0693bb..9c07ede8e7a 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_widget.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_widget.js @@ -269,6 +269,7 @@ var MassMailingFieldHtml = FieldHtml.extend({ } var $newLayout = $('
', { class: 'o_layout oe_unremovable oe_unmovable bg-200 ' + themeParams.className, + style: themeParams.layoutStyles, 'data-name': 'Mailing', }).append($new_wrapper); @@ -418,7 +419,8 @@ var MassMailingFieldHtml = FieldHtml.extend({ return imagesInfo[filename]; } return imagesInfo.all; - } + }, + layoutStyles: $theme.data('layout-styles'), }; }); $themes.parent().remove();