From 1e094ee7e029546d5ee0e5389cc6f60fe7e8312f Mon Sep 17 00:00:00 2001 From: Lorenzo Romero Date: Fri, 16 Aug 2024 16:00:57 +0200 Subject: [PATCH] Re-added needaction_partner_id field to bitcoin notification --- payment_bitcoin/models/bitcoin.py | 6 ++++++ 1 file changed, 6 insertions(+) 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