fix: ensure disabled state logic explicitly checks for positive order changes in POS action buttons
This commit is contained in:
parent
9a5787f25d
commit
8eff7cd492
@ -3,7 +3,7 @@
|
||||
<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">
|
||||
<attribute name="t-if">pos.canPay</attribute>
|
||||
<attribute name="t-att-disabled">this.pos.getOrderChanges().nbrOfChanges</attribute>
|
||||
<attribute name="t-att-disabled">this.pos.getOrderChanges().nbrOfChanges > 0</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[hasclass('set-table')]" position="replace">
|
||||
<!-- Hidden "Set Table" button on Register order -->
|
||||
@ -14,7 +14,7 @@
|
||||
<button t-if="(this.pos.cashier.pos_role == 'waiter' or this.pos.cashier.pos_role == 'cashier') and this.pos.config.basic_receipt"
|
||||
class="button btn btn-secondary btn-lg py-3 d-flex align-items-center justify-content-center flex-fill"
|
||||
t-att-class="{'col-3': showFastPaymentMethods}"
|
||||
t-att-disabled="currentOrder.isEmpty() or this.pos.getOrderChanges().nbrOfChanges"
|
||||
t-att-disabled="currentOrder.isEmpty() or this.pos.getOrderChanges().nbrOfChanges > 0"
|
||||
t-on-click="() => this.pos.printReceipt({ order: this.currentOrder, basic: true, printBillActionTriggered: true })">
|
||||
<i class="fa fa-print me-2"/> Table Checker
|
||||
</button>
|
||||
@ -24,7 +24,7 @@
|
||||
<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">
|
||||
<attribute name="t-if">!pos.scanning and pos.canPay</attribute>
|
||||
<attribute name="t-att-disabled">this.pos.getOrderChanges().nbrOfChanges</attribute>
|
||||
<attribute name="t-att-disabled">this.pos.getOrderChanges().nbrOfChanges > 0</attribute>
|
||||
</xpath>
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user