[FIX] mail: fix several traceback from a recent refactoring
Revision on https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498 This commit fixes some leftovers from an intermediary state of the refactoring above. The following tracebacks should be fixed: - unsubscribe from a private channel - replay - inviting a user
This commit is contained in:
@@ -99,7 +99,7 @@ var PartnerInviteDialog = Dialog.extend({
|
||||
self.do_notify(_t('New people'), notification);
|
||||
// Clear the membersDeferred to fetch again the partner
|
||||
// when getMentionPartnerSuggestions from the chatManager is triggered
|
||||
var channel = this.call('chat_manager', 'getChannel', self.channelID);
|
||||
var channel = self.call('chat_manager', 'getChannel', self.channelID);
|
||||
delete channel.membersDeferred;
|
||||
});
|
||||
}
|
||||
@@ -508,7 +508,7 @@ var Discuss = Widget.extend(ControlPanelMixin, {
|
||||
*/
|
||||
_selectMessage: function (messageID) {
|
||||
this.$el.addClass('o_mail_selection_mode');
|
||||
var message = this._getMessage(messageID);
|
||||
var message = this.call('chat_manager', 'getMessage', messageID);;
|
||||
this.selected_message = message;
|
||||
var subject = "Re: " + message.record_name;
|
||||
this.extendedComposer.set_subject(subject);
|
||||
@@ -903,10 +903,10 @@ var Discuss = Widget.extend(ControlPanelMixin, {
|
||||
if (def) {
|
||||
def.then(function (value) {
|
||||
if (value !== 'granted') {
|
||||
self._sendNotification(self, _t('Permission denied'),
|
||||
self.call('bus_service', 'sendNotification', self, _t('Permission denied'),
|
||||
_t('Odoo will not have the permission to send native notifications on this device.'));
|
||||
} else {
|
||||
self._sendNotification(self, _t('Permission granted'),
|
||||
self.call('bus_service', 'sendNotification', self, _t('Permission granted'),
|
||||
_t('Odoo has now the permission to send you native notifications on this device.'));
|
||||
}
|
||||
});
|
||||
@@ -963,7 +963,7 @@ var Discuss = Widget.extend(ControlPanelMixin, {
|
||||
* @private
|
||||
*/
|
||||
_onUnsubscribeButtonClicked: function () {
|
||||
this._unsubscribe(this.channel);
|
||||
this.call('chat_manager', 'unsubscribe', this.channel);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user