From 86814d3ae9f54faa94faf703cc95f4639172ff99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernanda=20Hern=C3=A1ndez?= Date: Wed, 30 Nov 2022 00:03:58 +0000 Subject: [PATCH] [FIX] account_move_name_sequence: call flush before to post the moves --- account_move_name_sequence/models/account_move.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/account_move_name_sequence/models/account_move.py b/account_move_name_sequence/models/account_move.py index 8813263f7f6..d843c762fe1 100644 --- a/account_move_name_sequence/models/account_move.py +++ b/account_move_name_sequence/models/account_move.py @@ -64,3 +64,7 @@ def _is_end_of_seq_chain(self): if not invoices_other_sequences and invoices_no_gap_sequences: return False return super(AccountMove, invoices_other_sequences)._is_end_of_seq_chain() + + def _post(self, soft=True): + self.flush() + return super()._post(soft=soft)