| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 3 |
|
| 4 |
from odoo import models |
| 5 |
|
| 6 |
|
| 7 |
class PosOrder(models.Model): |
| 8 |
_inherit = 'pos.order' |
| 9 |
|
| 10 |
def action_pos_order_paid(self): |
| 11 |
res = super(PosOrder, self).action_pos_order_paid() |
| 12 |
if not self.config_id.set_tip_after_payment: |
| 13 |
payment_lines = self.payment_ids.filtered(lambda line: line.payment_method_id.use_payment_terminal == 'adyen') |
| 14 |
for payment_line in payment_lines: |
| 15 |
payment_line._adyen_capture() |
| 16 |
return res |