diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index 6f74445671d..32f68b0c1d9 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -617,6 +617,12 @@ class AccountPayment(models.Model): return for pay in self.with_context(skip_account_move_synchronization=True): + + # After the migration to 14.0, the journal entry could be shared between the account.payment and the + # account.bank.statement.line. In that case, the synchronization will only be made with the statement line. + if pay.move_id.statement_line_id: + continue + move = pay.move_id move_vals_to_write = {} payment_vals_to_write = {}