feat: add basic receipt print button for waiters and restrict payment options based on role

This commit is contained in:
Suherdy Yacob 2026-03-20 08:49:47 +07:00
parent aff682dab4
commit cc9aeb9103

View File

@ -5,6 +5,14 @@
<xpath expr="//button[contains(@class, 'pay-order-button')]" position="attributes">
<attribute name="t-if">this.pos.cashier.pos_role != 'waiter'</attribute>
</xpath>
<xpath expr="//button[contains(@class, 'pay-order-button')]" position="after">
<button t-if="this.pos.cashier.pos_role == 'waiter' 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-on-click="() => this.pos.printReceipt({ order: this.currentOrder, basic: true })">
<i class="fa fa-print me-2"/> Basic Receipt
</button>
</xpath>
<xpath expr="//t[@t-foreach='this.pos.config.fast_payment_method_ids']" position="attributes">
<attribute name="t-if">this.pos.cashier.pos_role != 'waiter' and showFastPaymentMethods</attribute>
</xpath>