summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant/static/src/xml
diff options
context:
space:
mode:
authorAntoine Prieels <anp@odoo.com>2020-08-27 09:50:57 +0000
committerAntoine Prieels <anp@odoo.com>2020-08-28 06:18:48 +0000
commiteaae65941177dcf89d03251343de3cb4e7866003 (patch)
treeb2e8f16a5e74882b00b68f2d670ca42d5809b7c8 /addons/pos_restaurant/static/src/xml
parent9b67f6ee0783e8b02edb260b3ba5a0322187a416 (diff)
[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#56639 Taskid: 2117032 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Diffstat (limited to 'addons/pos_restaurant/static/src/xml')
-rw-r--r--addons/pos_restaurant/static/src/xml/Screens/PaymentScreen/PaymentScreenElectronicPayment.xml19
1 files changed, 19 insertions, 0 deletions
diff --git a/addons/pos_restaurant/static/src/xml/Screens/PaymentScreen/PaymentScreenElectronicPayment.xml b/addons/pos_restaurant/static/src/xml/Screens/PaymentScreen/PaymentScreenElectronicPayment.xml
new file mode 100644
index 00000000000..11683ddbd12
--- /dev/null
+++ b/addons/pos_restaurant/static/src/xml/Screens/PaymentScreen/PaymentScreenElectronicPayment.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="PaymentScreenElectronicPayment" t-inherit="point_of_sale.PaymentScreenElectronicPayment" t-inherit-mode="extension" owl="1">
+ <xpath expr="//div[hasclass('send_payment_reversal')]/.." position="replace">
+ <t t-if="props.line.canBeAdjusted() &amp;&amp; props.line.order.get_total_paid() &lt; props.line.order.get_total_with_tax()">
+ <div class="button send_adjust_amount" title="Adjust Amount" t-on-click="trigger('send-payment-adjust', props.line)">
+ Adjust Amount
+ </div>
+ </t>
+ <t t-elif="props.line.can_be_reversed">
+ <div class="button send_payment_reversal" title="Reverse Payment" t-on-click="trigger('send-payment-reverse', props.line)">
+ Reverse
+ </div>
+ </t>
+ </xpath>
+ </t>
+
+</templates>