From 6ee87f74f5408ca0151d9225a61393d85aaa7510 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 22 Sep 2016 16:24:10 +0200 Subject: [PATCH] [FIX] mass_mailing: properly switch to right theme images The default image inside undropped snippet had to be switched everytime a theme is selected, even on first theme choice as the switch_theme method only switch images of snippet already dropped in the page. --- addons/mass_mailing/static/src/js/mass_mailing_editor.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/mass_mailing/static/src/js/mass_mailing_editor.js b/addons/mass_mailing/static/src/js/mass_mailing_editor.js index c009334e49b..0cb446d3d99 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_editor.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_editor.js @@ -213,9 +213,10 @@ snippets_editor.Class.include({ switch_theme(theme_params); $body.removeClass("o_force_mail_theme_choice"); first_choice = false; - } else { - switch_images(theme_params, $snippets); } + + switch_images(theme_params, $snippets); + selected_theme = theme_params; // Notify form view