diff options
| author | Christophe Matthieu <chm@odoo.com> | 2018-07-04 16:12:54 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2018-07-11 15:38:59 +0200 |
| commit | 0cf598761093915cdb1c10f8dbbf84c6ac34462f (patch) | |
| tree | 884c247ed7f796f14ef54361f01647041d4ac5a1 /addons/web_editor/static/src/js/backend/fields.js | |
| parent | f83f5322373de97bd9fb3b4c6738e297cadaafa7 (diff) | |
[FIX] web_editor: display record linked to the record when add followers
Diffstat (limited to 'addons/web_editor/static/src/js/backend/fields.js')
| -rw-r--r-- | addons/web_editor/static/src/js/backend/fields.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/web_editor/static/src/js/backend/fields.js b/addons/web_editor/static/src/js/backend/fields.js index 8bcb3d034ec..cfa88e02f6e 100644 --- a/addons/web_editor/static/src/js/backend/fields.js +++ b/addons/web_editor/static/src/js/backend/fields.js @@ -105,9 +105,9 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi attachedDocumentDomain.unshift('&'); attachedDocumentDomain.push(['create_uid', '=', session.uid]); } - if (this.recordData.model) { + if (this.recordData.res_model || this.recordData.model) { var relatedDomain = ['&', - ['res_model', '=', this.recordData.model], + ['res_model', '=', this.recordData.res_model || this.recordData.model], ['res_id', '=', this.recordData.res_id|0]]; if (!this.recordData.res_id) { relatedDomain.unshift('&'); @@ -158,8 +158,9 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi this.fieldNameAttachment = fieldNameAttachment; this.attachments = []; summernoteConfig.onUpload = this._onUpload.bind(this); - summernoteConfig.getMediaDomain = this._getAttachmentsDomain.bind(this); } + summernoteConfig.getMediaDomain = this._getAttachmentsDomain.bind(this); + if (config.debug) { summernoteConfig.toolbar.splice(7, 0, ['view', ['codeview']]); |
