[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.
This commit is contained in:
Christophe Matthieu
2018-07-11 15:38:59 +02:00
parent 50ab181762
commit 6a5dc8bcd1
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -20,7 +20,7 @@
invisible="not context.get('mail_invite_follower_channel_only')"
options="{'no_create': True}"/>
<field name="send_mail" invisible="context.get('mail_invite_follower_channel_only')"/>
<field name="message" attrs="{'invisible': [('send_mail','!=',True)]}" options="{'style-inline': true}" class="test_message"/>
<field name="message" attrs="{'invisible': [('send_mail','!=',True)]}" options="{'style-inline': true, 'no-attachment': true}" class="test_message"/>
</group>
<footer>
<button string="Add Followers"
@@ -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)