summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/static/src
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2020-10-16 09:54:19 +0000
committerqsm-odoo <qsm@odoo.com>2020-10-19 14:57:28 +0000
commit1a916fc2362c0b006460d94a219366ade1cce058 (patch)
treec6e31877688868752b7d4c8bac4eef3c30eba46b /addons/mass_mailing/static/src
parent22a9a3de3c205709597ab95d8987466bd5579c86 (diff)
[FIX] mass_mailing, *: restore mass mailing options
*: web_editor The snippet options which were specific to mass mailing were not loaded anymore as they were loaded outside of the iframe where the edition take places. Fortunately, the generic options were still working and are the most important. This bug was only revealed thanks to another bug fix which wanted to be done in the unloaded file. Note: this fix is a series of huge hack to make it possible and as safe as possible in stable versions. This obviously has to be refactored in master, if not already done. Part of https://github.com/odoo/odoo/pull/60203 X-original-commit: 7225ce6b862c4f6b99a97732833b43189530699a
Diffstat (limited to 'addons/mass_mailing/static/src')
-rw-r--r--addons/mass_mailing/static/src/js/mass_mailing_widget.js11
1 files changed, 8 insertions, 3 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 a5cba75e32f..55431e65f07 100644
--- a/addons/mass_mailing/static/src/js/mass_mailing_widget.js
+++ b/addons/mass_mailing/static/src/js/mass_mailing_widget.js
@@ -12,9 +12,7 @@ var _t = core._t;
var MassMailingFieldHtml = FieldHtml.extend({
xmlDependencies: (FieldHtml.prototype.xmlDependencies || []).concat(["/mass_mailing/static/src/xml/mass_mailing.xml"]),
- jsLibs: [
- '/mass_mailing/static/src/js/mass_mailing_snippets.js',
- ],
+ jsLibs: [],
custom_events: _.extend({}, FieldHtml.prototype.custom_events, {
snippets_loaded: '_onSnippetsLoaded',
@@ -28,6 +26,13 @@ var MassMailingFieldHtml = FieldHtml.extend({
if (!this.nodeOptions.snippets) {
this.nodeOptions.snippets = 'mass_mailing.email_designer_snippets';
}
+
+ // All the code related to this __extraAssetsForIframe variable is an
+ // ugly hack to restore mass mailing options in stable versions. The
+ // whole logic has to be refactored as soon as possible...
+ this.__extraAssetsForIframe = [{
+ jsLibs: ['/mass_mailing/static/src/js/mass_mailing_snippets.js'],
+ }];
},
//--------------------------------------------------------------------------