diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index fb2e7d59f30..d812d8e4955 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -661,7 +661,9 @@ class account_payment(models.Model): if any(len(record.invoice_ids) != 1 for record in self): # For multiple invoices, there is account.register.payments wizard raise UserError(_("This method should only be called to process a single invoice's payment.")) - return self.post() + res = self.post() + self.mapped('payment_transaction_id').filtered(lambda x: x.state == 'done' and not x.is_processed)._post_process_after_done() + return res def _create_payment_entry(self, amount): """ Create a journal entry corresponding to a payment, if the payment references invoice(s) they are reconciled.