From 16a75f7e6bbd8c01c35233de67eabd79bc185563 Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Mon, 31 Aug 2020 14:43:12 +0000 Subject: [PATCH] [FIX] account_edi: Process edi_document wo web services when cancelling When calling 'button_cancel', the EDI documents that don't need any web-services must be cancelled directly. X-original-commit: cd668909f578a7bbe87ab5e6f73df82855809c3b --- addons/account_edi/models/account_move.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account_edi/models/account_move.py b/addons/account_edi/models/account_move.py index 88bc1511227..46d8e1d67b7 100644 --- a/addons/account_edi/models/account_move.py +++ b/addons/account_edi/models/account_move.py @@ -162,6 +162,7 @@ class AccountMove(models.Model): self.edi_document_ids.filtered(lambda doc: doc.attachment_id).write({'state': 'to_cancel', 'error': False}) self.edi_document_ids.filtered(lambda doc: not doc.attachment_id).write({'state': 'cancelled', 'error': False}) + self.edi_document_ids._process_documents_no_web_services() return res