feat: disable Print Bill button when there are unsent order changes
This commit is contained in:
parent
a389ad963e
commit
6173399c87
@ -12,4 +12,11 @@
|
|||||||
<attribute name="t-attf-class">{{ currentOrder && currentOrder.isEmpty() ? 'btn-secondary' : 'btn-primary' }}</attribute>
|
<attribute name="t-attf-class">{{ currentOrder && currentOrder.isEmpty() ? 'btn-secondary' : 'btn-primary' }}</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
</t>
|
</t>
|
||||||
|
|
||||||
|
<t t-inherit="point_of_sale.ControlButtons" t-inherit-mode="extension" owl="1">
|
||||||
|
<!-- Disable Bill button if there are unsent changes -->
|
||||||
|
<xpath expr="//button[@t-on-click='clickPrintBill']" position="attributes">
|
||||||
|
<attribute name="t-att-disabled">!pos.getOrder()?.getOrderlines()?.length or pos.getOrderChanges().nbrOfChanges</attribute>
|
||||||
|
</xpath>
|
||||||
|
</t>
|
||||||
</templates>
|
</templates>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user