[FIX] mail: allow identifying the chatter in creation mode

Before this commit, the chatter was rendered as an empty <div/> without
any class while in creation mode. This <div/> was then placed inside
the .o_form_view_bg element by mistake, as it did not match the
'.oe_chatter' selector.
This commit is contained in:
qsm-odoo
2017-09-06 17:52:24 +02:00
parent cf4f357647
commit 9380169c74
+3 -1
View File
@@ -53,7 +53,9 @@ FormRenderer.include({
if (node.tag === 'div' && node.attrs.class === 'oe_chatter') {
if (this.mode === 'edit' && !this.state.data.id) {
// there is no chatter in create mode
return $('<div>');
var $div = $('<div>');
this._handleAttributes($div, node);
return $div;
} else {
if (!this.chatter) {
this.chatter = new Chatter(this, this.state, this.mailFields, {