From a54c6dbec260a8583107d3bbe0d5acbf83c4eea8 Mon Sep 17 00:00:00 2001 From: Felipe Motter Pereira Date: Thu, 23 May 2024 16:45:16 -0300 Subject: [PATCH] [FIX] l10n_br_account: validate move on document --- l10n_br_account/models/fiscal_document.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/l10n_br_account/models/fiscal_document.py b/l10n_br_account/models/fiscal_document.py index d4791e2d1da1..372e7561af2a 100644 --- a/l10n_br_account/models/fiscal_document.py +++ b/l10n_br_account/models/fiscal_document.py @@ -168,3 +168,9 @@ def _document_correction(self, justificative): msg = "Carta de correção: {}".format(justificative) self.message_post(body=msg) return result + + def _document_confirm(self): + result = super()._document_confirm() + move_ids = self.move_ids.filtered(lambda move: move.state == "draft") + move_ids._post() + return result