From 83859de33c62355a4d5ca4b5cfbdd62ff37167b0 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Fri, 25 Feb 2022 20:14:22 +0000 Subject: [PATCH] [FIX] account_edi: We should delete the last info/warning/error msg when success to not have something weird still in the view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes odoo/odoo#85818 X-original-commit: dab20ed277e32179244ae00df0b8d1c7c19011c6 Signed-off-by: William André (wan) --- addons/account_edi/models/account_edi_document.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/account_edi/models/account_edi_document.py b/addons/account_edi/models/account_edi_document.py index 5363a4befc6..7dcf852f997 100644 --- a/addons/account_edi/models/account_edi_document.py +++ b/addons/account_edi/models/account_edi_document.py @@ -127,7 +127,11 @@ class AccountEdiDocument(models.Model): if not old_attachment.res_model or not old_attachment.res_id: attachments_to_unlink |= old_attachment if move_result.get('success') is True: - document.state = 'sent' + document.write({ + 'state': 'sent', + 'error': False, + 'blocking_level': False, + }) else: document.write({ 'error': move_result.get('error', False),