Skip to content

Commit 1e094ee

Browse files
author
Lorenzo Romero
committed
Re-added needaction_partner_id field to bitcoin notification
1 parent 36791b1 commit 1e094ee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

payment_bitcoin/models/bitcoin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,19 @@ def send_bitcoin_address_goes_low_notification(self):
389389
if group:
390390
groups += group
391391

392+
needaction_partner_ids = [
393+
(4, user.partner_id.id) for user in groups.mapped("users")
394+
]
395+
392396
self.env["mail.message"].create(
393397
{
394398
"message_type": "notification",
395399
"subtype_id": self.env.ref("mail.mt_comment").id,
396400
"date": datetime.now(),
397401
"body": "<p>Only %s unused Bitcoin addresses are left. "
398402
"Please add new addresses.</p>" % unused_address_count,
403+
"partner_ids": needaction_partner_ids,
404+
"needaction": True,
399405
}
400406
)
401407
return

0 commit comments

Comments
 (0)