[FIX] pos_online_payment: remove override

As explained by ANV (https://github.com/odoo/odoo/pull/123237#pullrequestreview-1537263584), the override of _set_authorized method of payment.transaction model is currently dangerous and should be removed.
Indeed, he explains that any error in the _set_authorized method will remove the transaction from the database, even if it is successful.
According to him, the current safe approach is to only override _reconcile_after_done to catch successful transactions and process them safely.

closes odoo/odoo#131408

X-original-commit: b12f6df9e497fd0546c91f88f94f92dc5b606373
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
Theo VINCENT (thvi)
2023-08-10 09:12:07 +02:00
parent 8ce5ae5d38
commit 76239f0654
@@ -24,11 +24,6 @@ class PaymentTransaction(models.Model):
return pos_order.pos_reference
return super()._compute_reference_prefix(provider_code, separator, **values)
def _set_authorized(self, state_message=None, **kwargs):
""" Override of payment to process POS online payments automatically. """
super()._set_authorized(state_message=state_message, **kwargs)
self._process_pos_online_payment()
def _reconcile_after_done(self):
""" Override of payment to process POS online payments automatically. """
super()._reconcile_after_done()