summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/form_renderer.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2018-10-16 11:54:10 +0000
committerAaron Bohy <aab@odoo.com>2018-10-17 08:44:49 +0000
commitbd004ac75e2249fded10e69c7e1d3bf5b5f64911 (patch)
tree09640319482cf361d89f5004ba905e05bb85e559 /addons/mail/static/src/js/form_renderer.js
parenta1e052a4b46fb60c6673f49bc5e83dae3d045637 (diff)
[FIX] mail: chatter in x2many form view
Since rev. 755a8d815a, it crashed when the user tried to open an x2many record in form view (thus in a dialog), if there was a chatter in that form's arch. This was because the wrong viewType was used (for instance, list or kanban instead of form), to look into fieldsInfo, and thus the chatter fields couldn't be found. opw 1891378 opw 1892520 opw 1893100 closes odoo/odoo#27844
Diffstat (limited to 'addons/mail/static/src/js/form_renderer.js')
-rw-r--r--addons/mail/static/src/js/form_renderer.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/form_renderer.js b/addons/mail/static/src/js/form_renderer.js
index 21477f825c9..91d2c2033c4 100644
--- a/addons/mail/static/src/js/form_renderer.js
+++ b/addons/mail/static/src/js/form_renderer.js
@@ -54,6 +54,7 @@ FormRenderer.include({
if (!this.chatter) {
this.chatter = new Chatter(this, this.state, this.mailFields, {
isEditable: this.activeActions.edit,
+ viewType: 'form',
});
this.chatter.appendTo($('<div>'));
this._handleAttributes(this.chatter.$el, node);