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 Sep 9, 2024
1 parent 36791b1 commit 1e094ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions payment_bitcoin/models/bitcoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,19 @@ 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,
"partner_ids": needaction_partner_ids,
"needaction": True,
}
)
return
Expand Down

0 comments on commit 1e094ee

Please sign in to comment.