We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36791b1 commit 1e094eeCopy full SHA for 1e094ee
payment_bitcoin/models/bitcoin.py
@@ -389,13 +389,19 @@ def send_bitcoin_address_goes_low_notification(self):
389
if group:
390
groups += group
391
392
+ needaction_partner_ids = [
393
+ (4, user.partner_id.id) for user in groups.mapped("users")
394
+ ]
395
+
396
self.env["mail.message"].create(
397
{
398
"message_type": "notification",
399
"subtype_id": self.env.ref("mail.mt_comment").id,
400
"date": datetime.now(),
401
"body": "<p>Only %s unused Bitcoin addresses are left. "
402
"Please add new addresses.</p>" % unused_address_count,
403
+ "partner_ids": needaction_partner_ids,
404
+ "needaction": True,
405
}
406
)
407
return
0 commit comments