[FIX] mail: chatter: undefined context for internal notes
Commit 4f9c9ad adds the context to the RPC call of 'message_post', but the
context was only defined for messages sent, and not for internal notes logged.
This causes a crash when logging a note on a calendar event as its method
'message_post' makes the assumption that it always exists, and tries to access
one of its keys.
opw-652470
Closes #9164
This commit is contained in:
committed by
Nicolas Martinelli
parent
a43b220b33
commit
fe2c1020d1
@@ -485,6 +485,7 @@ var ChatterComposer = ChatComposer.extend({
|
||||
subtype: 'mail.mt_comment',
|
||||
message_type: 'comment',
|
||||
content_subtype: 'html',
|
||||
context: self.context,
|
||||
});
|
||||
|
||||
// Subtype
|
||||
@@ -503,7 +504,7 @@ var ChatterComposer = ChatComposer.extend({
|
||||
self.check_suggested_partners(checked_suggested_partners).done(function (partner_ids) {
|
||||
message.partner_ids = (message.partner_ids || []).concat(partner_ids);
|
||||
// update context
|
||||
message.context = _.defaults(self.context, {
|
||||
message.context = _.defaults({}, message.context, {
|
||||
mail_post_autofollow: true,
|
||||
});
|
||||
def.resolve(message);
|
||||
|
||||
Reference in New Issue
Block a user