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
|
from odoo import models, api
|
||||||
|
|
||||||
|
|
||||||
class AccountMoveSendWizard(models.TransientModel):
|
class AccountInvoiceSend(models.TransientModel):
|
||||||
_inherit = "account.move.send.wizard"
|
_inherit = "account.invoice.send"
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _get_default_mail_partner_ids(self, move, mail_template, mail_lang):
|
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
|
Allow archived partners when sending invoices via
|
||||||
the 'Send by Email' wizard.
|
the 'Send by Email' wizard.
|
||||||
"""
|
"""
|
||||||
# Force archived partners to be visible ONLY in this context
|
|
||||||
wiz = self.with_context(
|
wiz = self.with_context(
|
||||||
active_test=False,
|
active_test=False,
|
||||||
include_archived_partners=True,
|
include_archived_partners=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
return super(
|
return super(
|
||||||
AccountMoveSendWizard,
|
AccountInvoiceSend,
|
||||||
wiz
|
wiz
|
||||||
)._get_default_mail_partner_ids(move, mail_template, mail_lang)
|
)._get_default_mail_partner_ids(move, mail_template, mail_lang)
|
||||||
|
|||||||
Reference in New Issue
Block a user