summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/backend/fields.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2018-02-07 14:11:46 +0100
committerChristophe Matthieu <chm@odoo.com>2018-02-08 11:25:51 +0100
commit6494f511718893eec3573c60c0a62e04d386359d (patch)
treeef9c96ef986972d11fd26e240fd4515321909a1c /addons/web_editor/static/src/js/backend/fields.js
parent152e3f8686ec4f48ba22e5c13f92f72c2640a3b8 (diff)
[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.
Diffstat (limited to 'addons/web_editor/static/src/js/backend/fields.js')
-rw-r--r--addons/web_editor/static/src/js/backend/fields.js2
1 files changed, 2 insertions, 0 deletions
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']) {