Skip to content

Commit

Permalink
Re-added needaction_partner_id field to bitcoin notification
Browse files Browse the repository at this point in the history
  • Loading branch information
ozoromo committed Aug 16, 2024
1 parent 36791b1 commit 10ba17b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions payment_bitcoin/models/bitcoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,16 @@ def send_bitcoin_address_goes_low_notification(self):
if group:
groups += group

needaction_partner_ids = [(4, user.partner_id.id) for user in groups.mapped('users')]

self.env["mail.message"].create(
{
"message_type": "notification",
"subtype_id": self.env.ref("mail.mt_comment").id,
"date": datetime.now(),
"body": "<p>Only %s unused Bitcoin addresses are left. "
"Please add new addresses.</p>" % unused_address_count,
'needaction_partner_ids': needaction_partner_ids,
}
)
return
Expand Down

0 comments on commit 10ba17b

Please sign in to comment.