fix issue with notifications
This commit is contained in:
parent
044e3e230e
commit
3b1a62ddbc
|
|
@ -442,10 +442,9 @@ class Transaction(models.Model):
|
|||
|
||||
def action_send_notification(self, subj, msg, partner_ids):
|
||||
self.ensure_one()
|
||||
for rec in self:
|
||||
author = self.env['res.users'].sudo().browse(self._uid)
|
||||
author = author.id
|
||||
if False not in partner_ids:
|
||||
rec.message_post(type="notification", subject=subj, body=msg, author_id=author,
|
||||
partner_ids=partner_ids,
|
||||
subtype_xmlid="mail.mt_comment")
|
||||
# for rec in self:
|
||||
# partner_ids =list(filter(bool,partner_ids))
|
||||
# rec.message_post(type="notification", subject=subj, body=msg, author_id=self.env.user.id,
|
||||
# partner_ids=partner_ids,
|
||||
# subtype_xmlid="mail.mt_comment")
|
||||
return True
|
||||
|
|
|
|||
Loading…
Reference in New Issue