[FIX] payment: issue Authorize.net manual capture

When a 'manual capture' is set for Authorize.net and a client
make a payment in several partial payments the user can capture
all the authorized transactions without crashing now.

Task - 2676914

closes odoo/odoo#90212

X-original-commit: 68b354f7353e3b5fd1faaad1b762c3c73a286f0f
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Horacio Tellez Perez (hote) <hote@odoo.com>
This commit is contained in:
Horacio Tellez
2022-05-02 13:43:00 +02:00
parent 183b021b2f
commit d67b7cf3d8
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -26,10 +26,10 @@ class AccountMove(models.Model):
return self.with_context(active_test=False).transaction_ids._get_last()
def payment_action_capture(self):
self.authorized_transaction_ids._send_capture_request()
self.authorized_transaction_ids.action_capture()
def payment_action_void(self):
self.authorized_transaction_ids._send_void_request()
self.authorized_transaction_ids.action_void()
def action_view_payment_transactions(self):
action = self.env['ir.actions.act_window']._for_xml_id('payment.action_payment_transaction')
+2 -2
View File
@@ -1176,10 +1176,10 @@ class SaleOrder(models.Model):
line.qty_to_invoice = 0
def payment_action_capture(self):
self.authorized_transaction_ids._send_capture_request()
self.authorized_transaction_ids.action_capture()
def payment_action_void(self):
self.authorized_transaction_ids._send_void_request()
self.authorized_transaction_ids.action_void()
def get_portal_last_transaction(self):
self.ensure_one()