summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant/models/pos_payment.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/pos_restaurant/models/pos_payment.py')
-rw-r--r--addons/pos_restaurant/models/pos_payment.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/addons/pos_restaurant/models/pos_payment.py b/addons/pos_restaurant/models/pos_payment.py
new file mode 100644
index 00000000..d4bfae15
--- /dev/null
+++ b/addons/pos_restaurant/models/pos_payment.py
@@ -0,0 +1,15 @@
+# -*- 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,
+ })