From 1c48b2e46f1e3ce8c422e6fd21ef9bb04aa5dfbe Mon Sep 17 00:00:00 2001 From: ommo73 Date: Wed, 20 Mar 2019 14:34:41 +0500 Subject: [PATCH] :zap::one::zero: mail_private **New:** added ability to select channels for private message sending --- mail_private/models.py | 2 -- mail_private/static/src/js/mail_private.js | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mail_private/models.py b/mail_private/models.py index 2d16c99f..2dba1386 100644 --- a/mail_private/models.py +++ b/mail_private/models.py @@ -25,13 +25,11 @@ def _notify(self, force_send=False, send_after_commit=True, user_signature=True) else: self._notify_mail_private(force_send, send_after_commit, user_signature) - @api.multi def _notify_mail_private(self, force_send=False, send_after_commit=True, user_signature=True): """ Add the related record followers to the destination partner_ids if is not a private message. Call mail_notification.notify to manage the email sending """ - group_user = self.env.ref('base.group_user') # have a sudoed copy to manipulate partners (public can go here with # website modules like forum / blog / ... self_sudo = self.sudo() diff --git a/mail_private/static/src/js/mail_private.js b/mail_private/static/src/js/mail_private.js index 613a095d..3be4719c 100644 --- a/mail_private/static/src/js/mail_private.js +++ b/mail_private/static/src/js/mail_private.js @@ -126,8 +126,8 @@ Chatter.include({ self.result = {}; return new Model(this.context.default_model).query( ['message_follower_ids', 'partner_id']).filter( - [['id', '=', self.context.default_res_id]]).all(). - then(function (thread) { + [['id', '=', self.context.default_res_id]]).all() + .then(function (thread) { var follower_ids = thread[0].message_follower_ids; self.result[self.context.default_res_id] = []; self.customer = thread[0].partner_id;