[FIX] web_editor: render mass_mailing content after save

For some Chome version (e.g. 74 chrome verion on Debian) the iframe
trigger 'load' event twice (one time for document and on time for body),
the widget must insert the content in the body. Before this fix, the
content are add only one time and are removed by the next iframe loading.

closes odoo/odoo#33561

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
This commit is contained in:
Gorash
2019-05-22 11:54:25 +00:00
parent 1569bef308
commit 89de96410a
@@ -290,7 +290,7 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, {
def.resolve();
};
this.$iframe.one('load', function onLoad() {
this.$iframe.on('load', function onLoad() {
var _avoidDoubleLoad = ++avoidDoubleLoad;
ajax.loadAsset(self.nodeOptions.cssReadonly).then(function (asset) {
if (_avoidDoubleLoad !== avoidDoubleLoad) {