Merge pull request #706 from expsa/dev_odex25_transactions

Dev odex25 transactions
This commit is contained in:
Mostafa 2024-08-14 13:44:16 +03:00 committed by GitHub
commit fe4c90722a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 7 deletions

View File

@ -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