Fix allow_mail_archived_partner causing system notifications to send emails
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
from odoo import models, api
|
||||
|
||||
|
||||
class AccountMoveSend(models.TransientModel):
|
||||
_inherit = "account.move.send"
|
||||
|
||||
@api.model
|
||||
def _get_default_mail_partner_ids(self, move, mail_template, mail_lang):
|
||||
"""
|
||||
The invoice 'Send by Email' wizard uses this to compute partner_ids (To:).
|
||||
We must disable active_test here to include archived partners.
|
||||
"""
|
||||
wiz = self.with_context(active_test=False, include_archived_partners=True)
|
||||
return super(AccountMoveSend, wiz)._get_default_mail_partner_ids(move, mail_template, mail_lang)
|
||||
Reference in New Issue
Block a user