oca-ocb-pos/odoo-bringout-oca-ocb-pos_restaurant/pos_restaurant/models/pos_payment.py
Ernad Husremovic 3ca647e428 19.0 vanilla
2026-03-09 09:29:53 +01:00

15 lines
458 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class PosPayment(models.Model):
_inherit = 'pos.payment'
def _update_payment_line_for_tip(self, tip_amount):
"""Inherit this method to perform reauthorization or capture on electronic payment."""
self.ensure_one()
self.write({
"amount": self.amount + tip_amount,
})