diff --git a/account_invoice_update_wizard/wizard/account_move_update.py b/account_invoice_update_wizard/wizard/account_move_update.py index 98c0ba3..cbd540e 100644 --- a/account_invoice_update_wizard/wizard/account_move_update.py +++ b/account_invoice_update_wizard/wizard/account_move_update.py @@ -226,6 +226,9 @@ class AccountMoveUpdate(models.TransientModel): inv.message_post(body=_( 'Non-legal fields of invoice updated via the Invoice Update ' 'wizard.')) + # Purge existing PDF + report = self.env.ref("account.account_invoices") + report.retrieve_attachment(inv).unlink() return True