|
|
@ -1,15 +1,5 @@ |
|
|
|
<?xml version="1.0" encoding="UTF-8" ?> |
|
|
|
<templates xml:space="preserve"> |
|
|
|
<!-- Inheriting ActionpadWidget template for adding the button disable feature--> |
|
|
|
<t name="pos_access_right_hr.ActionpadWidget" owl="1" |
|
|
|
t-inherit="point_of_sale.ActionpadWidget" t-inherit-mode="extension"> |
|
|
|
<xpath expr="//button[hasclass('pay-order-button')]" position="attributes"> |
|
|
|
<attribute name="t-att-disabled">disable_payment()</attribute> |
|
|
|
</xpath> |
|
|
|
<xpath expr="//button[hasclass('set-partner')]" position="attributes"> |
|
|
|
<attribute name="t-att-disabled">disable_customer()</attribute> |
|
|
|
</xpath> |
|
|
|
</t> |
|
|
|
<!-- Inheriting ProductScreen template for adding the button disable feature --> |
|
|
|
<t name="pos_access_right_hr.ProductScreen" owl="1" |
|
|
|
t-inherit="pos_restaurant.SplitBillScreen" t-inherit-mode="extension"> |
|
|
@ -17,4 +7,41 @@ |
|
|
|
<attribute name="t-att-disabled">disable_payment()</attribute> |
|
|
|
</xpath> |
|
|
|
</t> |
|
|
|
|
|
|
|
<t t-name="pos_access_right_hr.ActionpadWidget" t-inherit="point_of_sale.ActionpadWidget" t-inherit-mode="extension"> |
|
|
|
<xpath expr="//div[hasclass('actionpad')]" position="replace"> |
|
|
|
<div class="actionpad d-flex flex-column flex-grow-1 mw-50 p-0 border-end"> |
|
|
|
<button class="button mobile-more-button btn btn-secondary flex-fill border-bottom" |
|
|
|
t-if="ui.isSmall and props.onClickMore" t-on-click="props.onClickMore"> |
|
|
|
<span>More...</span> |
|
|
|
</button> |
|
|
|
<button class="button set-partner btn btn-light rounded-0 py-2 flex-shrink-1 fw-bolder" |
|
|
|
t-att-disabled="disable_customer()" |
|
|
|
t-on-click="() => this.pos.selectPartner()"> |
|
|
|
<div class="d-flex justify-content-center align-items-center "> |
|
|
|
<span class="d-flex justify-content-center align-items-center rounded-circle me-2 text-bg-dark" |
|
|
|
t-if="!ui.isSmall"> |
|
|
|
<i class="fa fa-user" role="img" aria-label="Customer" title="Customer"/> |
|
|
|
</span> |
|
|
|
<div t-if="props.partner" class="text-truncate fw-bolder text-action"> |
|
|
|
<t t-esc="props.partner.name"/> |
|
|
|
</div> |
|
|
|
<div t-else="fw-bolder"> |
|
|
|
Customer |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</button> |
|
|
|
<button class="pay validation pay-order-button btn-primary" |
|
|
|
t-att-disabled="disable_payment()" |
|
|
|
t-attf-class="{{getMainButtonClasses()}}" |
|
|
|
t-att-class="{ 'with-more-button': props.onClickMore and ui.isSmall }" |
|
|
|
t-on-click="props.actionToTrigger ? this.props.actionToTrigger : () => pos.get_order().pay()"> |
|
|
|
<div class="pay-circle d-flex align-items-center justify-content-center py-2 mb-2"> |
|
|
|
<i class="oi oi-chevron-right" role="img" aria-label="Pay" title="Pay"/> |
|
|
|
</div> |
|
|
|
<t class="text-white" t-esc="props.actionName"/> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</xpath> |
|
|
|
</t> |
|
|
|
</templates> |
|
|
|