Fix allow_mail_archived_partner causing system notifications to send emails
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
from odoo import models, api
|
||||
|
||||
|
||||
class AccountMoveSendWizard(models.TransientModel):
|
||||
_inherit = "account.move.send.wizard"
|
||||
class AccountInvoiceSend(models.TransientModel):
|
||||
_inherit = "account.invoice.send"
|
||||
|
||||
@api.model
|
||||
def _get_default_mail_partner_ids(self, move, mail_template, mail_lang):
|
||||
@@ -10,13 +10,11 @@ class AccountMoveSendWizard(models.TransientModel):
|
||||
Allow archived partners when sending invoices via
|
||||
the 'Send by Email' wizard.
|
||||
"""
|
||||
# Force archived partners to be visible ONLY in this context
|
||||
wiz = self.with_context(
|
||||
active_test=False,
|
||||
include_archived_partners=True,
|
||||
)
|
||||
|
||||
return super(
|
||||
AccountMoveSendWizard,
|
||||
AccountInvoiceSend,
|
||||
wiz
|
||||
)._get_default_mail_partner_ids(move, mail_template, mail_lang)
|
||||
|
||||
Reference in New Issue
Block a user