Files
odoo_source/addons/pos_restaurant_adyen/models/pos_order.py
T
Antoine Prieels 3b5f0e198b [IMP] pos_restaurant(_adyen): Keep tab open
As long as the payment is not validated, the cashier can add products
to the order, even if the payment has been completed. The amount
authorized can be adjusted if the payment interface implements the
canBeAdjusted method.

closes odoo/odoo#56656

Taskid: 2117032
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-27 13:22:04 +00:00

17 lines
569 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class PosOrder(models.Model):
_inherit = 'pos.order'
def action_pos_order_paid(self):
res = super(PosOrder, self).action_pos_order_paid()
if not self.config_id.set_tip_after_payment:
payment_lines = self.payment_ids.filtered(lambda line: line.payment_method_id.use_payment_terminal == 'adyen')
for payment_line in payment_lines:
payment_line._adyen_capture()
return res