summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2018-07-11 14:47:33 +0200
committerChristophe Matthieu <chm@odoo.com>2018-07-11 15:38:59 +0200
commit6a5dc8bcd1310e1cd326026d64769a400a075202 (patch)
tree6855526f2b04df21501bc434aac253170da5505a /addons/web_editor/static/src/js
parent50ab1817620253c6090f0a9aa5fcaed4ff737f31 (diff)
[FIX] mail: remove attachment feature in add followers modal
Before this fix, the attachments are don't save to the record and are remove with the wizard. We can't add the attachments to mail.message (like 'mail.compose.message') because it's auto_delete/unlink and the attachments are removed before the recipient can read it.
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/backend/fields.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/backend/fields.js b/addons/web_editor/static/src/js/backend/fields.js
index cfa88e02f6e..1042c0ae0b4 100644
--- a/addons/web_editor/static/src/js/backend/fields.js
+++ b/addons/web_editor/static/src/js/backend/fields.js
@@ -136,7 +136,7 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
- ['insert', ['link', 'picture']],
+ ['insert', this.nodeOptions['no-attachment'] ? ['link'] : ['link', 'picture']],
['history', ['undo', 'redo']]
],
prettifyHtml: false,
@@ -144,6 +144,7 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi
inlinemedia: ['p'],
lang: "odoo",
onChange: this._doDebouncedAction.bind(this),
+ disableDragAndDrop: !!this.nodeOptions['no-attachment'],
};
var fieldNameAttachment =_.chain(this.recordData)