[FIX] mail: properly clear chatter id on new record
task-2348372 closes odoo/odoo#58824 X-original-commit: 189ff0af0ac209624910a7674f543d2d58ecb94f Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
@@ -5,6 +5,7 @@ const components = {
|
||||
Chatter: require('mail/static/src/components/chatter/chatter.js'),
|
||||
};
|
||||
const useStore = require('mail/static/src/component_hooks/use_store/use_store.js');
|
||||
const { clear } = require('mail/static/src/model/model_field_command.js');
|
||||
|
||||
const { Component } = owl;
|
||||
|
||||
@@ -59,7 +60,11 @@ class ChatterContainer extends Component {
|
||||
*/
|
||||
_update() {
|
||||
if (this.chatter) {
|
||||
this.chatter.update(this.props);
|
||||
const values = Object.assign({}, this.props);
|
||||
if (values.threadId === undefined) {
|
||||
values.threadId = clear();
|
||||
}
|
||||
this.chatter.update(values);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user