diff --git a/account_invoice_update_wizard/wizard/account_move_update.py b/account_invoice_update_wizard/wizard/account_move_update.py index ea59e8f..40cbdfe 100644 --- a/account_invoice_update_wizard/wizard/account_move_update.py +++ b/account_invoice_update_wizard/wizard/account_move_update.py @@ -227,6 +227,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