diff --git a/payment_bitcoin/models/bitcoin.py b/payment_bitcoin/models/bitcoin.py index 578a329..9c723d2 100644 --- a/payment_bitcoin/models/bitcoin.py +++ b/payment_bitcoin/models/bitcoin.py @@ -389,6 +389,10 @@ 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", @@ -396,6 +400,8 @@ def send_bitcoin_address_goes_low_notification(self): "date": datetime.now(), "body": "

Only %s unused Bitcoin addresses are left. " "Please add new addresses.

" % unused_address_count, + "partner_ids": needaction_partner_ids, + "needaction": True, } ) return