From 6494f511718893eec3573c60c0a62e04d386359d Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 7 Feb 2018 14:11:46 +0100 Subject: [FIX] base/mail: Added an access_token on the attachments url The access_token is automatically added by the media editor. It's added on the website and by the html editor to send by email. The widget display the attachments from 'ir.ui.view' (public attachment) and the attachment from the current record. Issue: can't load image in gmail or mobile because the client mail use a proxy who avoid ours odoo access. --- addons/web_editor/static/src/js/backend/fields.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'addons/web_editor/static/src/js/backend') diff --git a/addons/web_editor/static/src/js/backend/fields.js b/addons/web_editor/static/src/js/backend/fields.js index b84fcd21c91..ae7ee94e964 100644 --- a/addons/web_editor/static/src/js/backend/fields.js +++ b/addons/web_editor/static/src/js/backend/fields.js @@ -133,6 +133,8 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi this.$textarea.summernote(this._getSummernoteConfig()); this.$content = this.$('.note-editable:first'); this.$content.html(this._textToHtml(this.value)); + this.$content.data('oe-id', this.recordData.res_id || this.res_id); + this.$content.data('oe-model', this.recordData.model || this.model); // trigger a mouseup to refresh the editor toolbar this.$content.trigger('mouseup'); if (this.nodeOptions['style-inline']) { -- cgit v1.2.3 From ae39a89a096c8dcb315425a23e4c6d7a70ef2f27 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 30 Jan 2018 14:22:07 +0100 Subject: [FIX] web_editor: add thumbnail image to send attachment --- addons/web_editor/static/src/js/backend/fields.js | 1 + 1 file changed, 1 insertion(+) (limited to 'addons/web_editor/static/src/js/backend') diff --git a/addons/web_editor/static/src/js/backend/fields.js b/addons/web_editor/static/src/js/backend/fields.js index ae7ee94e964..d3d601bac73 100644 --- a/addons/web_editor/static/src/js/backend/fields.js +++ b/addons/web_editor/static/src/js/backend/fields.js @@ -118,6 +118,7 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi */ _getValue: function () { if (this.nodeOptions['style-inline']) { + transcoder.linkImgToAttachmentThumbnail(this.$content); transcoder.classToStyle(this.$content); transcoder.fontToImg(this.$content); } -- cgit v1.2.3