[FIX] payment: if a payment transaction processing fail, rollback.
- Before this commit when a transaction failed, the code doesn't rollback and continue to process the other transaction, thus creating record that should be rollbacked. closes odoo/odoo#28748
This commit is contained in:
@@ -799,7 +799,8 @@ class PaymentTransaction(models.Model):
|
||||
tx._post_process_after_done()
|
||||
self.env.cr.commit()
|
||||
except Exception as e:
|
||||
_logger.error("Transaction post processing failed, reason \"%s\"", e)
|
||||
_logger.exception("Transaction post processing failed")
|
||||
self.env.cr.rollback()
|
||||
|
||||
@api.model
|
||||
def _compute_reference_prefix(self, values):
|
||||
|
||||
Reference in New Issue
Block a user