1. Introduce an option in restaurant config to allow setting tips after payment. 2. Tip form is shown in bills so the customers can choose/set their tips. 3. Validated orders are kept in TipScreen (access via TicketScreen) so that at the end of the day, the user/cashier can set the tips for each validated order. closes odoo/odoo#55488 Task-id: 2117029 Related: odoo/upgrade#1606 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
16 lines
457 B
Python
16 lines
457 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import api, fields, models
|
|
|
|
|
|
class PosConfig(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,
|
|
})
|