[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:
Toufik Ben Jaa
2018-11-22 11:44:36 +00:00
parent 02ce0022b2
commit ae6ab96629
+2 -1
View File
@@ -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):