diff --git a/allow_mail_archived_partner/models/account_move_send.py b/allow_mail_archived_partner/models/account_move_send.py index be3c9d5..5fcf87e 100755 --- a/allow_mail_archived_partner/models/account_move_send.py +++ b/allow_mail_archived_partner/models/account_move_send.py @@ -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)