feat: disable pay buttons in POS when order changes are pending

This commit is contained in:
Suherdy Yacob 2026-06-20 09:41:00 +07:00
parent 0115957631
commit 9a5787f25d

View File

@ -3,6 +3,7 @@
<t t-name="pos_custom_access.ActionpadWidget" t-inherit="point_of_sale.ActionpadWidget" t-inherit-mode="extension"> <t t-name="pos_custom_access.ActionpadWidget" t-inherit="point_of_sale.ActionpadWidget" t-inherit-mode="extension">
<xpath expr="//button[hasclass('pay-order-button')]" position="attributes"> <xpath expr="//button[hasclass('pay-order-button')]" position="attributes">
<attribute name="t-if">pos.canPay</attribute> <attribute name="t-if">pos.canPay</attribute>
<attribute name="t-att-disabled">this.pos.getOrderChanges().nbrOfChanges</attribute>
</xpath> </xpath>
<xpath expr="//button[hasclass('set-table')]" position="replace"> <xpath expr="//button[hasclass('set-table')]" position="replace">
<!-- Hidden "Set Table" button on Register order --> <!-- Hidden "Set Table" button on Register order -->
@ -23,6 +24,7 @@
<t t-name="pos_custom_access.ProductScreen" t-inherit="point_of_sale.ProductScreen" t-inherit-mode="extension"> <t t-name="pos_custom_access.ProductScreen" t-inherit="point_of_sale.ProductScreen" t-inherit-mode="extension">
<xpath expr="//button[hasclass('pay-button')]" position="attributes"> <xpath expr="//button[hasclass('pay-button')]" position="attributes">
<attribute name="t-if">!pos.scanning and pos.canPay</attribute> <attribute name="t-if">!pos.scanning and pos.canPay</attribute>
<attribute name="t-att-disabled">this.pos.getOrderChanges().nbrOfChanges</attribute>
</xpath> </xpath>
</t> </t>
</templates> </templates>